My site has a text field with a default value that is filled after first user login. But, on the first visit, the text box is empty. How can I check if a text box is empty or not? Using Katalon Studio keywords (or Selenium, because I figure it should be the same or similar)?


1 Answer 1


Try this, get the value inside the input box and compare.

WebElement A = driver.findElementById("locator");
String text = A.getAttribute("value");
        System.Out.Println("input box is empty");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.