Script:
List<WebElement> addCheck=driver.findElements(By.name("ticketLess"));
for(WebElement checkbox : addCheck ){
System.out.println(checkbox.getAttribute("Text"));
}
HTML:
<input type="checkbox" name="ticketLess" value="checkbox">
<font face="Arial, Helvetica, sans-serif" size="2">
Same as Billing Address </font>
The text i am trying to get is Same as Billing Address
. I tried using getText()
also but its not returning nothing.