Skip to content
hekra01 edited this page Nov 3, 2014 · 2 revisions

QtWebDriver uses the browserStartWindow Selenium capability to lookup views by window title (as in WebView::windowTitle()).
At session creation QtWebDriver will look for an existing view whose windowtitle matches the value of browserStartWindow.

  • If found, QtWebDriver will use this view for rendering
    (if browserStartWindow is the * wildcard then the first found view will be picked)
  • Otherwise the QtWebDriver will create a new view using the view types registered in ViewFactory

e.g:

public class Test extends TestCase {
    WebDriver driver;
    String hubURL = "http://localhost:9517";
 
    protected void setUp() throws Exception {
        super.setUp();
        DesiredCapabilities capability = DesiredCapabilities.chrome();
        // capability.setCapability("browserStartWindow", "test");
        capability.setCapability("browserStartWindow", "*");
        driver = new RemoteWebDriver(new URL(hubURL), capability);
    }
Clone this wiki locally