Здесь мне нужно перейти от «Да» к «Нет», поэтому подскажите мне, как найти XPath для переключателя, и обратитесь к приведенному ниже HTML-коду.
WebElement toggleswitch =wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@id='mfaEnabledId']/following::label[@for='switcher']")));
toggleswitch.click();
Я использовал этот XPath, но он выдает такую ошибку
FAILED: verifyUserCreaton("naresh", "123", "nareshponnusamy77@gmail.com", "Naresh123", "Naresh@14499", "Naresh@14499")
org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element is not clickable at point (468, 561). Other element would receive the click:
(Session info: chrome=129.0.6668.101)
HTML
::before
::after
Подробнее здесь: https://stackoverflow.com/questions/790 ... enium-java