This code repository will show usage of selenium and python for automation testing purpose.
- Install Python 3.6 or above. It is suggested to use Anaconda distributions for bundled package of Python.
- Use 'pip install selenium' to install selenium, ensure it lies in project path itself. (In case you have not used Ananconda distribution, first install pip using 'get-pip.py')
- Install webdriver downloader using 'pip install webdriverdownloader'.
- Download browser driver respective to your browser. Ensure to place the driver exe in project path itself. (You can use webdriverdownloader to download different browser drivers, e.g. webdriverdownloader chrome:2.38 firefox opera:v.2.35)
- Clone the project to your local machine.
- Run through the example codes.
This code shows how to use Webdriver to launch a specific url on Firefox using python and selenium bindings. It further shows element search and interacting with elements on browser.
This code shows how to use unittest framework for writing python test scripts. Note: unittest.main() needs argument only when running with IPython or Juypter notebook.