Please suggest.
List<WebElement> chckbox= driver.findElements(By.xpath("//input[@id='Checkbox']"));
System.out.println("Total Records are -- > " + chckbox.size());
int i=0;
while(i!=2){
WebElement checkBox = [b:36zil2pi]driver.findElement([b]By.xpath("//input[@id='Checkbox'][/b:36zil2pi]"))[/b]; ====> [b:36zil2pi]According to me xpath not correct[/b:36zil2pi].
checkBox.click();
i++;
}
[b:36zil2pi]====>> I debug it and observe that issue is in my xpath because in first iteration it check by first checkbox but when it goes to second
iteration it again click on the first check box so that first check box is unchecked. it does not click on second check box.[/b:36zil2pi]
[quote="SamSelenium":t2vokc4q]No update from your side????[/quote:t2vokc4q]
we were on holidays past couple of days.
ids cannot be same of 2 elements tell the developer of the website that they have made a mistake. tell them to fix it.