FindElement using Locators in Selenium 4, click and sendKeys - Selenium Tutorials

Published: 27 June 2020
on channel: Automation Zone
1,395
44

This video will teach you how to identify properties or attributes of elements in a webpage, save them and perform click action on buttons and links and entering text in textbox using the below locators:
By.id("value"); By.name("value"); By.className("value"); By.className("value"); By.linkText("value"); By.partialLinkText("value") By.tagName("value");

 Intro : (0:00)
Inspecting WebElements : (1:33)
Locating By ID : (3:16)
Entering Text in a text box : (6:00)
Locating By Name : (8:06)
Locating By ClassName : (11:06)
Locating By LinkName and PartialLinkName : (14:04)
Locating By TagName : (17:46)
HTML Basic : (18:28)

Playlist :    • Selenium Tutorials - version 4  
OrangeHRM : https://opensource-demo.orangehrmlive...
HTML Tags : https://www.w3schools.com/TAGS/defaul...

Follow Us on Facebook :   / theautomationzone  

Code :
System.setProperty("webdriver.chrome.driver", "C:\\selenium\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://opensource-demo.orangehrmlive...");
driver.findElement(By.id("txtUsername")).sendKeys("Admin");
driver.findElement(By.name("txtPassword")).sendKeys("admin123");
driver.findElement(By.className("button")).click();
driver.navigate().back();
driver.findElement(By.partialLinkText("Forgot your password?")).click();
driver.navigate().back();
driver.findElement(By.partialLinkText("password")).click();


Watch video FindElement using Locators in Selenium 4, click and sendKeys - Selenium Tutorials online without registration, duration hours minute second in high quality. This video was added by user Automation Zone 27 June 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,395 once and liked it 44 people.