+91 9790664230
kumar.arun211@gmail.com

Category: python

Blog to learn python and selenium

File upload using Python Selenium Webdriver

We have seen how to download file using Python Selenium Webdriver in this article. File upload is also frequently used use case in automation testing and in this article, lets learn how to upload a file using Python Selenium Webdriver. We use the same file upload sample page that we used for our Java example…
Read more

Read data from excel in python scripts

We often encounter scenarios where we have to read data from excel file stored. In this article, let’s see how we can read data from a xls(Excel) file and use the data in our Python scripts. At the end of this article, you will learn how to open a xls file, read data from a…
Read more

how to handle Stale Element Reference Exception in Python Selenium

A stale element reference exception is thrown in one of two cases: The element that we are trying to interact 1. has been deleted entirely 2. no longer attached to the DOM First cause is more common than the second one. We have reference to an element that has been deleted or changed in wep…
Read more

Python selenium commands cheat sheet

Frequently used python selenium commands – Cheat Sheet To import webdriver module in python use below import statement from selenium import webdriver Driver setup: Firefox: firefoxdriver = webdriver.Firefox(executable_path=”Path to Firefox driver”) To download: Visit GitHub Chrome: chromedriver = webdriver.Chrome(executable_path=”Path to Chrome driver”) To download: Visit Here Internet Explorer: iedriver = webdriver.IE(executable_path=”­Pat­h To­ IEDriverServer.exe”) To download:…
Read more

How to wait for elements in Python Selenium WebDriver

We all know and experimented that Selenium WebDriver can interact with web browser and simulate user actions. User actions could be click, select, type etc.. or combinations of these actions. However most of the user action requires some kind of wait before performing it. Reasons could be many, including but not limited to below. Page…
Read more

Selenium headless mode tests on Chrome and Firefox

In this short article lets experiment on how users can run Selenium headless tests on Chrome and Firefox browser headless mode. Before Selenium headless browser usage, user should know browser options that Selenium provides. Below is brief introduction. Options in Chrome and Firefox browser provides mechanism that we can use to customize and configure a…
Read more

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

Test Execution in Chrome using Python Selenium

In this post, we are going to try test execution in Chrome browser and load URL of our choice. Note: For Firefox Test Execution, Please check here Method 1 Steps to be followed are same as Firefox. Only the instance will change from Firefox to Chrome Step 1: Import webdriver module. The selenium.webdriver module provides support…
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

Capture screenshot of an Element using Python Selenium WebDriver

In this post, we explored how to capture Screenshot in Python Selenium Webdriver. Sometimes we may just want to capture a part of the page, just on specific element based on ID, or any specific element locator. For example, we would like to capture the logo in Google page with id = “hplogo” Selenium WebDriver…
Read more

© 2018 Copyrights. All Rights Reserved. Arunkumar Velusamy