+91 9790664230
kumar.arun211@gmail.com

Tag: python

Blog to learn python selenium from java selenium

Handling multiple windows in Python Selenium

There are many cases where handling multiple windows while working with a web application is required, either application navigates to or opens multiple windows and user has to perform operations in this new window. Those are may be advertisements or kind of information showing on popup windows such as terms & conditions,privacy policy or kind…
Read more

Working with file downloads in Python Selenium WebDriver

File download is nothing new and we often have to download files while executing automation tests. Python Selenium WebDriver is excellent in manipulating browser commands however lacks features to handle operating system native windows like automating file downloads. While automating use cases we often encounter scenarios to download files like Ms Excel file, MS word…
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. 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 is not selected…
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 on the same machine. This is possible and as easy as running tests in other scenarios using Selenium WebDriver. In java, We can do it in two ways: 1) System.setProperty(“webdriver.gecko.driver”, “Path_To_Firefox_Driver/geckodriver”); System.setProperty(“webdriver.firefox.bin”, “Path_To_Firefox_Binary”); WebDriver driver = new FirefoxDriver();…
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