-1

I just started using Selenium Web Driver to test an online banking transaction application.

I love it, but there is something that annoy me. Let say i access the login screen with this code:

    driver.get("https://webdev.myurl:18113/");
    WebElement element = driver.findElement(By.name("username"));
    element.sendKeys("xxxx");
    element.submit();

the browser start and the page load and display. But it look like the page try loading element from an external site and the findElement (2nd line) wait for these request to complete!

Is there a way to bypass this beahvior?

I tried this too :

    WebElement element = (new WebDriverWait(driver, 10)).until(new  ExpectedCondition<WebElement>() {
        @Override
        public WebElement apply(WebDriver d) {
            return d.findElement(By.name("username"));
        }
    });

But it does not help since this line seems to execute only when the page is totally loaded.

EDIT: I spoke with one of the guy here.. and he told me ipinvite.iperceptions.com is not called by our app.!!! and in fact when i load the site in FF, i don't see this call?!

Does Selenium web driver call this site : ipinvite.iperceptions.com?

Anyone have the same issue?

Cygnusx1
  • 5,329
  • 2
  • 27
  • 39

3 Answers3

1

You can try setting implicitly wait time and page load time to 0. Google "selenium implicitly wait time" and "selenium page load time."

Mayur
  • 676
  • 8
  • 16
0

Time outs on get function have not been implemented yet. When creating a new FirefoxDriver, there are overloads in the constructor that allow you to specify a command timeout which is the maximum time to wait for each command.

You could refer to the answer on this post

Community
  • 1
  • 1
Amey
  • 8,470
  • 9
  • 44
  • 63
-3

ok, i found the problem. I commented out the setPreference to my FirefoxProfile that was setting the proxy parameters. I noticed i did not need them anyway. And now there is no more call to this wierd ipinvite.iperception.com!

Thanks for the time you took to reply

Regards

Cygnusx1
  • 5,329
  • 2
  • 27
  • 39