Skip to content

Instantly share code, notes, and snippets.

@jimevans
Created August 28, 2018 22:38
Show Gist options
  • Save jimevans/0e7145c31c7daf6f037941557734064a to your computer and use it in GitHub Desktop.
Save jimevans/0e7145c31c7daf6f037941557734064a to your computer and use it in GitHub Desktop.
[Test]
public void ClickLabelTest()
{
driver.Url = EnvironmentManager.Instance.UrlBuilder.CreateInlinePage(new InlinePage()
.WithBody(
"<label id='wrapper'>wraps a checkbox <input id='check' type='checkbox' checked='checked' style='display:none'/></label>"));
IWebElement label = driver.FindElement(By.Id("wrapper"));
label.Click();
IWebElement checkbox = driver.FindElement(By.Id("check"));
Assert.IsFalse(checkbox.Selected);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment