Class DriverHelper


  • public final class DriverHelper
    extends java.lang.Object
    Helper class to restore drivers and their properties.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.openqa.selenium.remote.HttpCommandExecutor getHttpCommandExecutor​(AgentClient agentClient, boolean appium)
      Initializes an executor for future commands execution.
      static void setCapabilities​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.Capabilities capabilities)
      Sets capabilities in a driver instance when reconnecting it to an existing session.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setCapabilities

        public static void setCapabilities​(org.openqa.selenium.WebDriver driver,
                                           org.openqa.selenium.Capabilities capabilities)
        Sets capabilities in a driver instance when reconnecting it to an existing session.
        Parameters:
        driver - a driver to set the capabilities in
        capabilities - capabilities to be set
      • getHttpCommandExecutor

        public static org.openqa.selenium.remote.HttpCommandExecutor getHttpCommandExecutor​(AgentClient agentClient,
                                                                                            boolean appium)
        Initializes an executor for future commands execution.
        Parameters:
        agentClient - an instance of an Agent client to provide the remote address and codecs info
        appium - indicates whether an Appium executor is requires for Appium driver
        Returns:
        a new instance of the HttpCommandExecutor with all configuration set