What I\'m trying to do is click on (or off) any of the checkboxes on my page. As you can see from the HTML, each checkbox element would appear to have a unique identifier but w
To get input with type checkbox just use css selector below.
Element:
Css Selector:
input[data-yesno-name='Url_Transaction_Out']
Code:
driver.FindElement(By.CssSelector("input[data-yesno-name='Url_Transaction_Out']")).Click();
To check and select:
IWebElement checkbox = driver.FindElement(By.CssSelector("input[data-yesno-name='Url_Transaction_Out']"));
if(!checkbox.IsSelected())
{
checkbox.Click();
}