Thursday, September 23, 2010

Python-Selenium

Selenium is very popular among the Software testers/QA, due to it’s various advantages over others.
Here are some of the advantages of Selenium:
  • It is Open Source
  • Supports multiple languages like Java, Python, Perl, C#, Ruby, Groovy, Java Script, VB Script etc.
  • Supports most popular Operating systems like Windows, Linux, Mac etc.
  • Supports many Browsers like Firefox, IE, Chrome, Safari etc.
  • Supports Mobile application testing like Android, iOS. Appium is an extension of Selenium.
  • Can be integrated with different types of Frameworks and Continuous Integration tools.
There are some disadvantages too:
  • Supports only Web based automation and not Window based applications.
  • Testers should have sound knowledge of the languages which they are using.
  • Online support is not there, as the tool is open source. Testers need to depend on forums for any issues.

Why Python?

As a tester, we do have little time to automate and we usually end up spilling the automation tasks to the next cycle/sprints. This is were Python has its advantage.
Python is easy to learn and easy to understand others code. As Python has been given importance to readability of the code. So it is easy to understand other testers code. This saves a lot of time, which is very important for a tester.
There are many blogs/articles about this, but I like the one given by Cris Ewing.

How to get Selenium on Python?

Answer is EASY. Yes it is very easy to install selenium using pip.

Linux(Ubuntu):
$ sudo apt-get install python-pip
$ sudo pip install selenium

Windows
Start a command prompt using the command prompt program and run the pip.exe
C:\Program Files\Python35\Scripts\pip.exe install selenium
You are ready to start your Selenium automation using Python as the language.


Happy Automating :)