Answers for "find by selenium"

1

find elements in selenium

//required imports 
WebDriver driver = new ChromeDriver();
WebElement objWE;
//There are many way most common are id and xpath
objWE = driver.findElement(By.id("String of id attribute"));
//To find the xpath easily hit F12 and right click the element you want
//and copy xpath then paste it
objWE = driver.findElement(By.xpath("//*[@id="search"]/div[2]/div[6]/div[1]/div/div"));
Posted by: Guest on July-24-2020
0

find by in selenium

FindBy is an annotation used in 
Page Object Model design pattern to identify the elements.
Posted by: Guest on January-30-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language