Selenium with Python Learn Online

Introduction

  • Why do we need Selenium with Python  not Java?

    •  Java programs tend to run slower compared to Python programs.
    • Java uses traditional braces to start and ends blocks, while Python uses indentation.
    • Java employs static typing, while Python is dynamically typed.
    •  Python is simpler and more compact compared to Java.
    • 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:

    • Python Basic Course
  • Python Variable Declaration Rules
  • Data types in Python
  • Function & Parameters in Python
  • Python Data structures and operation
  • Python – File Operations
  • Python –Modules
  • Python – Object Oriented Programming
Execution steps
Selenium- Web Driver
  • Introduction to Selenium
  • Introduction to Web driver and Remote vs. Local
  • Guide to install Web driver
  • Creating your first script on Web driver
  • Accessing Forms in Web driver
  • Accessing Links and Table content in Web driver
  • Remote web driver
Automation Framework
  • Advanced Web element access method- Contains, Sibling, Ancestor and etc.,
  • Framework designing methods
  • Framework adaptation
  • Feature Testing Automation
  • Report Generation out of Automation
  • Real time Automation and the Challenges
PyAutoGUI – Controlling Mouse and Keyboard
  • Introduction to pyautogui
  • Accessing Flash content using pyautogui
  • Controlling Keyboard and Mouse events on web driver