From the course: Scripting for Testers

Unlock the full course today

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

Checking data with Selenium

Checking data with Selenium - Python Tutorial

From the course: Scripting for Testers

Start my 1-month free trial

Checking data with Selenium

- [Teacher] We've looked at navigating through a web page with Selenium but this course is about scripting. So now that we have this ability, what can we do wit it? How can we use the power of scripting with this? Let's look at an example of a way that we might use Selenium to find out some additional information about our site. We'll use this site phptravels.net for demonstration purposes. This is a testing site that e can use to try out certain things. So for this example let's check the offer prices of these various offers. So we'll inspect this and we can see that it is in a b tag. So let's go to Visual Studio Code where we've got a driver defined and let's find the b tags. So we'll just call that b tags and we'll use driver dot find elements with an s by tag name and we'll get the b. So that should get us all the b tags on that page. Now we can loop over these elements to do some stuff with them. So let's create something we'll call a price list and let's loop over each of the…

Contents