+91 9790664230
kumar.arun211@gmail.com

Category: python

Blog to learn python and selenium

Taking Screenshot using Python Selenium WebDriver

Hello, welcome to Python Selenium tutorials and in this post let’s see how to capture Screenshot in Python Selenium Webdriver Ability to take screenshots is most important and desirable feature for bug analysis. Sometimes, apart from bug analysis, one may want to capture screenshots to see the flow of test steps. Screenshots help automation testers…
Read more

Top 5 commonly encountered exceptions in Python Selenium WebDriver

1. NoSuchElementException selenium.common.exceptions.NoSuchElementException Base: selenium.common.exceptions.WebDriverException This exception can be imported as ‘from selenium.common.exceptions import NoSuchElementException’ This exception is raised or thrown when element could not be found. There could many possible reasons for this exception to occur 1. Element locator is not correct 2. Page is not yet loaded 3. Element is not yet displayed…
Read more

How to handle exceptions in Selenium Python WebDriver

An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program’s instructions. Exception handling is not new and it is the process of responding to the occurrence of exceptions that may happen during execution of our program. For example, when we are trying to click…
Read more

Working with RadioButtons using Python Selenium Webdriver

Radio buttons are similar to checkboxes. But allows selection of only one value in a group of values. Radio button operation is easy to perform, we just need to find the radio button element using any one of the techniques explained here, and click on it. Radio button does not support deselection. To deselect a…
Read more

Working with checkboxes using Python Selenium Webdriver

Often times we encounter scenarios to work with Checkboxes using python selenium. CheckBox operations are easy to perform, we just need to find the checkbox element using any one of the techniques explained here, and click on it. It is not always straight forward anyway. Because we may need to select checkbox only when it…
Read more

Mouse Over actions using Python Selenium WebDriver

There will be scenarios where we need to click on the item of a drop down menu. In order to perform this action manually, first we need to bring up the drop down menu by holding mouse over the parent menu. Then click on required child menu from drop down menu displayed. Using ActionChains class…
Read more

How to locate elements in Python Selenium Webdriver

There are 8 different strategies available in Selenium WebDriver to locate elements in a page. Using, id name class name tag name link text partial linktext tag name xpath and css Any one of these strategies can be used based on the usecase. Python Selenium WebDriver implementation provides the following methods to find or locate…
Read more

How to open Firefox browser by passing driver executable path

In this post, we have seen how to start Firefox. Before executing the script, we ensured that Firefox driver is available in PATH. There is another way to start Firefox without PATH settings. Instead of setting PATH environment variable, executable_path property can be passed while invoking Firefox instance. Syntax: driver = webdriver.Firefox(executable_path=”[path to driver location]”);…
Read more

How to open URL in specific Firefox browser version

Often times we encounter a scenario where we need to run tests on different versions of Firefox browser on the same machine. This specific Firefox browser tests run using python selenium is possible and as easy as running tests in other scenarios using Selenium WebDriver. In java, We can do it in two ways: 1)…
Read more

How to open URL in Firefox browser

In this post, we are going to try opening Firefox browser and then load URLĀ of our choice. Prerequisites: User should have knowledge of, module import in python access imported module functions Step 1: Import necessary modules. The selenium.webdriver module provides all the WebDriver implementations. Currently supported WebDriver implementations are Firefox, Google Chrome, Internet Explorer and…
Read more

© 2018 Copyrights. All Rights Reserved. Arunkumar Velusamy