Automated testing with Selenium
Selenium is renowned for testing web applications and allows us to test web pages. Selenium automatically performs actions a user would do and can simultaneously execute assertions. Furthermore, Selenium works with Chrome, Firefox, and Safari. Therefore, besides installing Selenium, we must install the driver software for the browser or browsers we want to test.
In this section, we’ll install Selenium and the Chrome driver and then build an automated version of the end-to-end test. We only cover what is necessary to create basic Selenium tests. For detailed information about Selenium, check the documentation at https://selenium-python.readthedocs.io/.
Okay – let’s install the necessary software:
- Install Selenium with this command:
$ pip install selenium
- Navigate in your browser to https://selenium-python.readthedocs.io/
installation.html#drivers
and follow the instructions to install a driver for your browser...