From the course: Advanced Selenium: 3 Synchronization Strategies

Unlock the full course today

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

Using JavaScript for waiting

Using JavaScript for waiting - Selenium Tutorial

From the course: Advanced Selenium: 3 Synchronization Strategies

Start my 1-month free trial

Using JavaScript for waiting

- [Instructor] working with JavaScript for waiting can be very useful for low level synchronization conditions. The issue is it's very easy to make mistakes. So I'm going to use this waiting for GS abstraction tests to explore the creation of an abstraction layer that will make it a little bit easier to detect syntax errors, and cut down in the amount of code I'm going to write. So I have a test here called waiting GS example, which uses the messages screen and has two weights, both of which are synchronizing on low level conditions in the application. The danger of this is if I make a mistake, I'm going to change this from an equality to an assignment and run the test, we'll see that the JavaScript can have a big impact on the running application. So know the message count is null, it's minus one. There's a mistake in the application though because of our WebDriver code. So I want to try make it a little bit harder for me…

Contents