October 2018
Intermediate to advanced
192 pages
5h 12m
English
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 ...
Read now
Unlock full access