Explicit Wait with ...
Notifications
Clear all

Explicit Wait with Page Factory is not working as expected

RSS

(@sathish)
Member Moderator
加入:2年ago
Posts: 1391
15/05/2021 10:55 am

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);


Quote
(@anamika)
Noble Member
加入:2年ago
Posts: 1381
15/05/2021 10:56 am

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

Driver = new ChromeDriver(); Driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(60));

ReplyQuote
Share:
Baidu