I want to uncheck the radio button on a webpage which is checked by default but i am getting error
"Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not interactable"
Can someone please help me to correct my code which i am trying?
WebElement travellerbutton = driver.findElement(By.xpath("//label[text()='Traveller']/preceding-sibling::input[@type='radio']"));
travellerbutton.click();
HTML:
<div class="radio">
<input type="radio" name="tgselect" id="traveller" checked="">
<label for="traveller">Traveller</label>
<div class="check"></div>
</div>