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

Опубликовано: 27 Июнь 2020
на канале: 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();


Смотрите видео FindElement using Locators in Selenium 4, click and sendKeys - Selenium Tutorials онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Automation Zone 27 Июнь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,395 раз и оно понравилось 44 людям.