How to make condition to perform multiple radio button click (see image below)...?
I've tried for hours, but I got only single radio button click (see attached image)
List<WebElement> radiobutton = driver.findElements(By.xpath("//*[@type='radio']"));
System.out.println("Total element is " + radiobutton.size());
for (int i = 0; i < radiobutton.size(); i++) {
// if you are getting stale element exception because of the page
// reload
radiobutton = driver.findElements(By.xpath("//*[@type='radio']"));
System.out.println(radiobutton.get(i).getAttribute("value"));
// select your radio and click to go to next page
radiobutton.get(i).click();
Thread.sleep(3000);
driver.findElement(By.xpath("//input[@id='btnCheckFare']"))
.click();
Thread.sleep(3000);
}