Explicit Wait with Page Factory is not working as expected

+1 vote
Hi,

The pages I am testing have different page load time, some load in 2 second some in 4 or longer. I am using page object model with PageFactory and explicit wait as shown below but it didn't work. Could you please show me the correct way of using explicit wait with page factory? If page factory is not the best choise for using explicit wait, could you show me an example using object model without page factory? Do I also need to use a pageLoadTimeout along with explicit wait?  

PageFactory.initElements(new AjaxElementLocatorFactory(driver, 40), this);

Thank you!
Oct 14 in Selenium by Tewodros
• 130 points
49 views

1 answer to this question.

0 votes

Hey Tewadros, you can use implicit wait with POM by using following commands:

Driver = new ChromeDriver();
Driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(60));
answered Oct 14 by Abha
• 27,180 points

Related Questions In Selenium

0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Not able to use “explicit wait” in my code

To wait until the entire data has ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,110 points
97 views
0 votes
1 answer

Selenium IDE (2.9.1.1-signed) not working with latest Version of Firefox

Unfortunately, Selenium IDE will be deprecated soon. ...READ MORE

answered Mar 30, 2018 in Selenium by nsv999
• 5,110 points

edited Apr 4, 2018 by nsv999 3,431 views
0 votes
1 answer

To check that the web page is loaded or not using Selenium Web Driver?

The solution is using Implicit Wait which ...READ MORE

answered May 24, 2018 in Selenium by Meci Matt
• 9,420 points
6,014 views
0 votes
1 answer

Selenium ChromeBrowser get() method is not working

Make sure you are passing a valid ...READ MORE

answered May 25, 2018 in Selenium by Samarpit
• 5,130 points
630 views
0 votes
1 answer
0 votes
2 answers