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, 2019 in Selenium by Tewodros
• 130 points
179 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, 2019 by Abha
• 27,720 points

Related Questions In Selenium

0 votes
2 answers
0 votes
1 answer

How to check if an image is displayed on web page while working with Selenium WebDriver?

I've come across a similar situation before, where the image ...READ MORE

answered May 10, 2019 in Selenium by Surya
• 970 points
880 views
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,510 points
115 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,510 points

edited Apr 4, 2018 by nsv999 3,880 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,460 points
7,424 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,850 points
700 views
0 votes
1 answer
+1 vote
3 answers

Need to wait until page is completely loaded - Selenium WebDriver

You can try something like -  new WebDriverWait(firefoxDriver, ...READ MORE

answered Dec 20, 2019 in Selenium by Robin
8,128 views