Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SafariLauncher - Unable to find any web views #3

Open
ArchanaChalapalle opened this issue Jul 23, 2014 · 1 comment
Open

SafariLauncher - Unable to find any web views #3

ArchanaChalapalle opened this issue Jul 23, 2014 · 1 comment

Comments

@ArchanaChalapalle
Copy link

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.

@ArchanaChalapalle ArchanaChalapalle changed the title SafariLauncher - unable to get any elements after navigating in the browser SafariLauncher - Unable to find any web views Jul 23, 2014
@gaddesurendrakumar
Copy link

found any solution, facing same problem , driver returns element not found
WebElement div = driver.findElementByXPath(emailXpath);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants