From the course: Python Automation and Testing

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

A simple code example

A simple code example

- [Instructor] Let's take a quick run through a simple code example to get a better idea of how the Python Selenium bindings work. I'll head over to the exercise files where I go to chapter 1 and do the third video. I have a Python script already. This is the audio. So I'm going to open the script with IDLE. In this script, we open a new browser instance. We head over the the site python.org. In the website, we'll be looking for the search box and we'll be typing in the keyword pycon. Once we search for the keyword pycon, the search results will be available for eight seconds because we're making the browser window sleep for eight seconds. Following which, it will close. So I'm quickly gonna run this script and we can see how it works. So, you can see that the keyword of Python is so much fun we get to search results. And for after eight seconds, the browser window closes. This test script is just the tip of the iceberg with regards to what test automation using selenium can do for…

Contents