How do you get the count of all text boxes on a webpage?

AnswerBot
6mo

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

Roshini Sandhya
7mo
public class Counttestbox { public static void main(String[] args) { WebDriverManagerchrome driver().setup(); WebDriver driver=new Chrome driver ngtm(). driver { goat driver }
Suganya Krishnamoorthi
1y

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());

}

}

Fahad Dhillum
2y

textbox = driver.find_elements(By,TagName , "Textarea")

counter = len(textbox)

Fahad Dhillum
2y

textbox = driver.find_elements(By,TagName , "Textarea")

counter = len(textbox)

PraveenKumar Velaiyah
3y

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

Select
Add answer anonymously...

Cognizant Selenium Automation Tester interview questions & answers

A Selenium Automation Tester was asked 4mo agoQ. What are 5 common SQL error codes?
A Selenium Automation Tester was asked Q. What is the syntax for Explicit wait?
A Selenium Automation Tester was asked Q. How do you upload a resume using Selenium?

Popular interview questions of Selenium Automation Tester

A Selenium Automation Tester was asked 5mo agoQ1. What are 5 common SQL error codes?
A Selenium Automation Tester was asked Q2. What is the syntax for Explicit wait?
A Selenium Automation Tester was asked Q3. How do you upload a resume using Selenium?
Cognizant Selenium Automation Tester Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits