Home > Automation Testing

Different approaches for writing effective Xpaths for Web Automation

Are you new to web automation and struggling with crafting Xpaths for various scenarios? Look no further – this guide covers all possible ways to write Xpaths to suit every situation. Whether the web element's text is dynamic, attributes are unique, or you're dealing with complex structures, we've got you

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

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: from selenium import webdriver. from selenium.webdriver.support.ui import Select. driver = webdriver.Chrome('D:\\chromedriver.exe') driver.get('url') select = Select(driver.find_element_by_id('Country')) # select by visible

This Article is TAGGED in . Read more

Python sample programs – Part 1

1. Calculate the Average of Numbers in a Given List count=int(input("Average of how many numbers do you want to find?")) a=[] for i in range(0,count): number=int(input("Enter number: ")) a.append(number) average=sum(a)/count print("Average of numbers is: ",average) Output: Average of how many numbers do you want to find?5 Enter number: 2 Enter number: 3 Enter

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-67370cf3402b1767765668/] 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

This Article is TAGGED in , , . Read more