-1

I doing automation on a particular website(say xyz.com). When I open the URL manually, it lands me onto a login page as expected and I am able to login there as well.
However, when I am automating the scenario by creating new instance of Firefox using new FirefoxDriver(), login page opens quickly but; when I click on login button it takes almost 2 minutes to navigate to a homepage. I tried using a new profile but it didnt help. I am using Selenium 2.44.0 on MAC with Java(Eclipse). Please help.

Nik_stack
  • 213
  • 2
  • 7
  • 17

1 Answers1

0

I had the same problem with Selenium. What I ended up doing was making the webdriver wait till the page title changes(to homepage) using Expected Conditions.

WebDriverWait wait = new WebDriverWait(driver, 15);
wait.until(ExpectedConditions.titleContains(": My Expected Page title"));

I would suggest you to have a look here:

  1. driver.wait() throws IllegalMonitorStateException

    1. Wait for page load in Selenium
Community
  • 1
  • 1
sjmach
  • 426
  • 6
  • 15