From the course: Advanced Selenium: Support Classes

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Slow loadable components

Slow loadable components - Selenium Tutorial

From the course: Advanced Selenium: Support Classes

Start my 1-month free trial

Slow loadable components

- [Instructor] So, we've looked at the page object loading, which often requires us to load the page and check we're on the correct page. The LoadableComponent is good for that. If I really want to synchronize on the page and wait for it to load, I can use the SlowLoadableComponent from the support classes. The MessageHistoryComponent, which I'm using here on line 33 actually does wait for the component to load, so that's a good candidate for using the SlowLoadableComponent. If I click through to this with Command + click, or Control + click on Windows, we can see that the waitTillReady method has a custom loop and wait mechanism that I've written to make sure that there are items in the list. By using the SlowLoadableComponent, we get the waiting semantics for free and I won't have to write a while loop and calculate the times as I currently do here. So I'll make this MessageHistoryComponent extend the…

Contents