Implicit Timeout in Web Driver:
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
Get text for Particular Element:
driver.findElement(By.id("ElementId")).getText())
Accept Alert:
Alert alert = driver.switchTo().alert();
String text = alert.getText();
Select Frame with Xpath.
driver.findElement(By.xpath("(//a[contains(text(),'Frames')])[2]")).click();
driver.findElement(By.linkText("Small Window ("popup")")).click();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
Get text for Particular Element:
driver.findElement(By.id("ElementId")).getText())
Accept Alert:
Alert alert = driver.switchTo().alert();
String text = alert.getText();
Select Frame with Xpath.
driver.findElement(By.xpath("(//a[contains(text(),'Frames')])[2]")).click();
driver.findElement(By.linkText("Small Window ("popup")")).click();
No comments:
Post a Comment
Thanks for your valuable comments