Home > Automation Testing

Select value from drop-down in Selenium using Python

Sometimes we need to select a value from drop down in selenium. This drop down list can be of country, state, city etc.. In selenium using python, we can select values from drop-down using following sample code snippet: [crayon-62b9e9b8e7ea6751031520/] Decoding code 1. from selenium import webdriver:  This line states that, from selenium module/library webdriver

This Article is TAGGED in . Read more

How to handle alerts – prompts in Selenium using Python

Alerts are used to show success, failure messages. Most of the times while automating applications there are situations to handle Alerts. Below are the few methods in selenium for handling alerts: accept() dismiss() text Below is the code snippet in selenium using python: [crayon-62b9e9b8e838a703404505/] Decoding code 1. from selenium import webdriver:  This line states that, from selenium module/library

This Article is TAGGED in . Read more

Python sample programs – Part 1

  1. Calculate the Average of Numbers in a Given List [crayon-62b9e9b8e8610510069380/] 2. Exchange the Values of Two Numbers Without Using a Temporary Variable [crayon-62b9e9b8e8616992962544/] 3. Reverse a Given Number [crayon-62b9e9b8e8618793740479/] 4. Check Number is Positive or Negative [crayon-62b9e9b8e8619235682263/] 5. Take in the Marks of 5 Subjects and Display the Grade [crayon-62b9e9b8e861b656059244/] 6. Print all Numbers in a Range Divisible by

This Article is TAGGED in . Read more

Protractor: Script execution using custom command

This article will cover below points:  Use of custom command instead of protractor along with user defined options to control the execution of script. Protractor script execution for different test suites using different configuration files i.e. In regression test suite we will execute all spec files In smoke test suite we execute

This Article is TAGGED in , , , , , , . Read more

How to Inspect Elements of android Apps

1.Download and Install Android studio from https://developer.android.com/studio/?gclid=CjwKCAiAkrTjBRAoEiwAXpf9Ca1elpQO4-roBhqiwirYqy1-CCqxfVSpGaQcum38H1rAP3eyUQULoxoC0ZUQAvD_BwE 2.In command prompt Navigate to the location C:\Users\username\AppData\Local\Android\Sdk\tools 3.Run monitor.bat 4.Launch Android studio 5.launch AVD Manager from Tools 6.Click on “Launch this AVD in emulator” icon to launch emulator. 7.In emulator open the App which you want to inspect. 8.In Android Device Monitor click on “Dump View Hierarchy for UI

This Article is TAGGED in , . Read more

Spy(Element Identification) tool for automating windows 10 applications

I was recently automating windows application and searching for spy tools to identify windows 10 elements. I found “WAD UIRecorder” tool which works better compare to other spy tools in Windows 10. Follow below steps to download and configure “WAD UIRecorder”: Step1: Below is the link to download the spy tool. https://github.com/microsoft/WinAppDriver/releases Step2: Click

This Article is TAGGED in , . Read more

Integrating Winium with Katalon studio

Winium is used to automate windows applications. Katalon does not support windows automation. If any web application needs interaction with windows application then we can integrate Winium with Katalon studio. Below are the steps to integrate Winium with Katalon Studio: Step1: Download the Zip file “Winium.Desktop.Driver.zip” from https://github.com/2gis/Winium.Desktop/releases Step2: Extract the downloaded Zip

This Article is TAGGED in , , . Read more

Finding elements of table in selenium

Elements in table can be accessed using xpath. Here is the sample HTML code: [crayon-62b9e9b8e9137296551540/] To locate first “td” in first “tr” in above HTML code. Below is the xpath:   //table//tr[1]/td[1] To locate second “td” in first “tr”. Below is the xpath. //table//tr[1]/td[2] To locate cells of Pune and Mumbai below is the xpath. //table//tr[1]/td To locate the

This Article is TAGGED in , . Read more

Types of locators and best practices to use locators in selenium

There are 8 locators in selenium. Those are... tagName id name className linkText partialLinkText cssSelector xpath It is confusing to decide which locator to select while identifying the element. To avoid the confusion below are the best practices while selecting the locators. First preference should be given to tagName. If tagName is not unique or not available then next preference should

This Article is TAGGED in , , . Read more

File Upload Using Windows Automation Tool And Selenium

Here are the step to upload file using selenium Click on Select file / Select button (This part could be handled using Selenium) Select file from open dialogue box(This part could not be handled using selenium)  Click on Upload or Upload file button. File Upload for INPUT tag with TYPE ="file" Example Url:  If Select file

This Article is TAGGED in , , . Read more