![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 871 Articles for Automation Testing
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
3K+ Views
We can automate a calendar using Selenium webdriver. It may be a bit difficult to automate tests on a calendar since the selection of day, month, and year can be different in web UI from one calendar to another.A calendar can be in the form of a dropdown selection or with backward and forward buttons to select up and down in dates or with any other features. Let us see an example of selection of the 03/02/2021(2nd March, 2021) date in the below calendar −In the above example, the calendar is within a table. A table is represented by ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
277 Views
We can register a gecko driver with Selenium webdriver. For the Firefox versions greater than 47, we can execute tests in Firefox with the geckodriver.exe file. To download this executable file, visit the below link − https://github.com/mozilla/geckodriver/releasesNext, we have to choose the link of the zip file which is compatible with our local operating system. As the download of the zip file is done, it has to be extracted and the file – geckodriver.exe should be saved in a location.To register this geckodriver.exe file, we have to set the path of the geckodriver.exe file with the System.setProperty method. Also we ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
4K+ Views
We can select each div separately that have the same class with the help of the Selenium webdriver. Often in the html code, we find more than one div element having a class attribute with the same value.Let us see the html code of elements with div tag having the same value set for the class attribute (as highlighted in the image). The value of the class attribute is - colsm-5 col-xs-8 store-details sp-detail paddingR0.To identify each of these div elements separately, we shall use the method findElements and pass the value of the class attribute as a parameter to ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
710 Views
We can load an extension in Chrome browser using Selenium webdriver.While we are using the Chrome browser in our local system, we can add multiple extensions to it.However, while Chrome browser is launched by Selenium webdriver, those extensions which are available to our local browser may not be present. We have to explicitly add them with the help of the .crx file of the extensions.To add an extension for example, Momentum, navigate to the below link − https://chrome.google.com/webstore/category/extensions.Type Momentum in the search box and hit Enter. Select the correct option from the search results.As the next page is navigated, we ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
298 Views
The benefits of using Selenium as an automation testing tool are listed below −It is open-source and comes free without licensing cost.It can used be used with more than one programming languages like C#, Java, Python, JavaScript, and so on.It can be used in more than one platforms like Windows, Mac, Linux, and so on.It can be used for testing an application in more than one browser like Chrome, Firefox, IE, Safari, and so on.It has a big community assistance for resolving users' queries.It can support record and playback features with the help of Selenium IDE.It can reduce use of ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
18K+ Views
We can select the text of a span on click with Selenium webdriver. To identify the element with span tag, we have to first identify it with any of the locators like xpath, css, class name or tagname.After identification of the element, we can perform the click operation on it with the help of the click method. Then obtain its text with the text method. Let us investigate the html code of a webelement with a span tag.Examplefrom selenium import webdriver #set chromodriver.exe path driver = webdriver.Chrome(executable_path="C:\chromedriver.exe") driver.implicitly_wait(0.5) #launch URL driver.get("https://www.tutorialspoint.com/index.htm") #identify element and enter text e = driver.find_element_by_class_name("search") e.send_keys("tutorialspoint@gmail.com") ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
4K+ Views
We can locate elements in span class and not unique id with the help of the Selenium webdriver. We can identify an element having a class attribute with the help of the locator xpath, css or class name.To locate elements with these locators we have to use the By.xpath, By.xpath or By.cssSelector method. Then pass the locator value as a parameter to this method.Let us see the html code of a button having a span class and try to identify it.Examplefrom selenium import webdriver #set chromodriver.exe path driver = webdriver.Chrome(executable_path="C:\chromedriver.exe") driver.implicitly_wait(0.5) #launch URL driver.get("https://www.tutorialspoint.com/index.htm") l = driver.find_element_by_id("textemail") l.send_keys("abc@gmail.com") #get value ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
2K+ Views
We can handle plugin popup using Selenium webdriver in Python. Whenever a popup comes on page, we cannot inspect elements within the popup and identify them.Also, in order to access other elements on the page, we have to first either accept default has access to the main page. To interact with the popup, we have to explicitly shift the driver focus with the help of the switch_to.alert() method.The popup mainly consists of a message along with Ok and Cancel buttonsto accept and dismiss a popup respectively. To accept a popup, the method switch_to.alert().accept() is used.To dismiss a popup, the method ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
8K+ Views
We can find elements by multiple class names. If there is an element having more than one value separated by spaces set for the class attributes, it is called the compound class names.Let us see the HTML code of such web elements having compound class names −We shall get an exception if we use both the values - toc and chapters with the class name locator for the above scenario. Instead, the rule is to have only one class attribute value with the class name locator.SyntaxWebElement l = driver.findElement(By.className("toc")); //Invalid locator value with className locator WebElement l = driver.findElement(By.className("toc chapters"));Exampleimport ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
586 Views
We can prioritize tests in TestNG during execution. It must be noted that priority can only be set for test methods with @Test annotation. Lower the priority number set for a test method, higher the priority it gets during execution.Only integer value (positive, zero or negative) can be set as priority. A decimal number can also be set as priority, however it is required to be converted to integer value via typecasting.A test method cannot have multiple priority numbers. Also, the priority for a test method cannot be set from the TestNG XML file.Syntaxpublic class TestNG { @Test (priority ... Read More