Skip to content

SafariLauncher - Unable to find any web views #3

@ArchanaChalapalle

Description

@ArchanaChalapalle

I am currently getting this error using SafarLauncher with real iPhone device. Can you please help?
014-07-23T20:10:36.985Z - debug: [REMOTE] Getting WebKitRemoteDebugger pageArray

2014-07-23T20:10:36.995Z - warn: Could not find any webviews yet, retrying

I increased the delay to 20 seconds , I am getting to the url after 20 seconds .

my code is as follows:

private WebDriver remoteWebDriver;

@Test
public void runstuff() throws InterruptedException {

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(CapabilityType.BROWSER_NAME, "safari");

    capabilities.setCapability("platformName", "iOS");

    capabilities.setCapability("deviceName", "iPhone");

      capabilities.setCapability(CapabilityType.PLATFORM, "Mac");
    try {
        System.out.println("before");
        remoteWebDriver =  new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

        System.out.println("after........");


    }

    System.out.println("Running First Test");

            Thread.sleep(30000);

remoteWebDriver.get("http://www.google.com ");
WebElement element1 = remoteWebDriver.findElement(By.id("gb-main"));
System.out.println(element1);
WebElement element = remoteWebDriver.findElement(By.name("q"));
element.sendKeys("Cheese!");

                    element.submit(); 

                    System.out.println("Page title is: " + remoteWebDriver.getTitle()); 
                    remoteWebDriver.quit(); 

}
}

I did try to use window handles , but that did not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions