While trying to automate my application, one of the webpage has a toggle button inside a table and i need to select the same.
Below is the image of HTML code.I am unable to copy paste the code hence attaching the image.
Below is the code tried but getting error as unable to locate element.
IWebElement btn3 = driver.FindElement(By.XPath("//input[@id='livingExpenseConsent']/ancestor::span"));
Actions action2 = new Actions(driver);
action2.MoveToElement(btn3).Click().Perform();
Kindly suggest the right way to locate the element.

Aucun commentaire:
Enregistrer un commentaire