Skip to content

Custom Capabilities

hekra01 edited this page Oct 30, 2014 · 7 revisions

QtWebDriver supports the following custom capabilities

  • browserStartWindow
    WD will search all existed views and attach to one with same title. Or if this capablities equals "*" then to first one. See View Selection.
  • browserClass
    WD will call ViewFactory and create window registered with specified classname.
  • maximize
    WD will be try start window with maximum size
  • reuseUI
    If set to true, the starting WebDriver session will terminate any pre-existing session without closing the opened windows. e.g:
DesiredCapabilities cap = new DesiredCapabilities();
//specify reuseUI to have WebDriver terminate any previous session and reuse its windows
cap.setCapability("reuseUI", true);
 
//specify to select the first found window
cap.setCapability("browserStartWindow", "*");
wd = new RemoteWebDriver(new URL("http://localhost:9517"), cap);
  • windowsize
    WD will be try create window with given size, as a string (e.g. - "600, 600")
  • windowposition
    WD will be try start window with desired position, as a string (e.g. - "80, 60")
Clone this wiki locally