How to get the count of all text box in a web page?
Use Selenium WebDriver to find and count all text boxes on a web page.
Use Selenium WebDriver to locate all text boxes on the web page
Use findElements method with input tag and type attribute as text t...read more
public class Counttestbox {
public static void main(String[] args) {
WebDriverManager.chromedriver().setup();
WebDriver driver=new ChromeDriver();
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
driver.get("https://testautomationpractice.blogspot.com/");
driver.manage().window().maximize();
//select specific one textboxes
//driver.findElement(By.xpath("//input[@id='monday']")).click();
//total number of textboxes
List<WebElement> textboxes=driver.findElements(By.xpath("//input[@type='text']"));
System.out.println("Total number of textboxes:"+textboxes.size());
}
}
textbox = driver.find_elements(By,TagName , "Textarea")
counter = len(textbox)
textbox = driver.find_elements(By,TagName , "Textarea")
counter = len(textbox)
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("http://localhost/2010A15/?p=register");
java.util.List<WebElement> textboxes = driver.findElements(By.xpath("dijitReset...read more
Top Cognizant Selenium Automation Tester interview questions & answers
Popular interview questions of Selenium Automation Tester
Reviews
Interviews
Salaries
Users/Month