Python is easy compared to other programming languages, having far less verbose.

The Python APIs empower you to connect with the browser through Selenium.

Selenium sends the standard Python commands to different browsers, despite variation in their browser’s design.Selenium supports Python and thus can be utilized with Selenium for testing.

You can run Python scripts for Firefox, Chrome, IE, etc.on different Operating Systems.

Python Programming

Basic Programming in Python

Python Setups and path settings for windows and linux.

Download Python from the following link and install to your local drive.

First Python Program Hello World

>>>print"Hello, Python!"

If you are running new version of Python, then you would need to use print statement with parenthesis as in print (“Hello, Python!”);. However in Python version 2.4.3, this produces the following result:

Script Mode Programming

Invoking the interpreter with a script parameter begins execution of the script and continues until the script is finished. When the script is finished, the interpreter is no longer active.

Let us write a simple Python program in a script. Python files have extension .py. Type the following source code in a test.py file: