Selenium Testing in Python Features of Selenium • • • • • • • Opensource Automation supportive Handling Multitude of test cases Speed control Multi Browser support Multi Language support Handling of Dynamic Web Elements • Selenium is a prominent open source apparatus that designers and specialized analyzers use for web program test computerization and cross-program testing. • Tests can be composed with normal programming dialects, including C#, Groovy, Java, Perl, PHP, Python, Ruby and Scala. • Selenium is a test device that enables you to compose mechanized web application UI tests in any programming dialect against any HTTP site utilizing any standard JavaScript-empowered program. Selenium comes in two sections • A server which can consequently dispatch and slaughter bolstered programs, and goes about as a HTTP intermediary for web demands from those programs. Variant 1.0 of the server was called Selenium Remote-Control (RC), adaptation 2.0 was called WebDriver. • Client applications that send orders to the Selenium server in an exceptional dialect (called Selenese) that reveal to it what operations to perform on the propelled web program. • Selenium likewise offers adaptability as far as composing test scripts. It is a bit much that if the application is produced in one programming dialect, the scripts ought to be composed in a similar dialect. • It is free of the dialect in which the site is made. For instance, if the application under test is produced in Python, it is not required that the scripts be composed just in Python, the test scripts can be composed in either JAVA or .Net. Unit Test (Libraries) • • • • • • • • from lib2to3.pgen2 import driver import unittest import requests from selenium import webdriver from selenium.webdriver.common.keys import Keys from bs4 import BeautifulSoup from selenium.webdriver.common.by import By import time Purpose of test • To check page content – Search Results • Titles • Type – Headings – Event and response