Selenium is a web automation framework that can be used to automate website testing. Because Selenium starts a webbrowser, it can do any task you would normally do on the web.
Browser Automation with Python Selenium
To start a web browser, the Selenium module needs a web driver.
Supported browsers are:
- Internet Explorer
- PhantomJS (invisible)
To start a browser, you will need to corresponding driver. The driver “ChromeDriver” is needed to start Chrome, “FirefoxDriver” for Firefox.
All drivers can be downloaded from: https://docs.seleniumhq.org/download/
Python will start and control the chromium browser using the code below:
You can change the browser using: