ByAll locator

We have introduced an address text area that has a class, ID, and name defined and we will zero in on this element using the series of locators

The following code uses the ByAll constructor, which takes in a variable number of locators as arguments:

  public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver",
System.getProperty("user.dir")
+ "\src\main\resources\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("C:\Users\Bhagyashree\Desktop\Documents\myHTML.html");
driver.findElement(
new ByAll(By.className("tarea"), By.id("tid"), By.name("tname")))
.sendKeys("FirstTest");

}
}

It's the turn of the ByChained locator.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.146.184