Explicit Wait with Page Factory is not working as expected

+1 vote

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

1 answer to this question.

0 votes

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

Driver = new ChromeDriver();
answered Oct 14, 2019 by Abha
• 28,060 points

Related Questions In Selenium

+1 vote
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
0 votes
1 answer

Not able to use “explicit wait” in my code

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

answered Mar 28, 2018 in Selenium by nsv999
• 5,500 points
0 votes
1 answer

Selenium IDE ( 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,500 points

edited Apr 4, 2018 by nsv999 6,161 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
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,890 points
+1 vote
4 answers

Need to wait until page is completely loaded - Selenium WebDriver

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

answered Dec 21, 2019 in Selenium by Robin
0 votes
1 answer