public void CheckBoxChecked() { Expect.Once.On(iWebElement).GetProperty("Selected").Will(Return.Value(false)); Assume.That(false == checkBox.Selected); Expect.Once.On(iWebElement).GetProperty("Selected").Will(Return.Value(false)); Expect.Once.On(iWebElement).Method("Click"); checkBox.Check(); Expect.Once.On(iWebElement).GetProperty("Selected").Will(Return.Value(true)); Assert.AreEqual(true, checkBox.Selected); mocks.VerifyAllExpectationsHaveBeenMet(); }
public void ConfigPlan() { var checkBoxes = this.Browser.FindElements(By.ClassName("storageLoggingOptions")); foreach (var vb in checkBoxes) { var checkBox = new HtmlCheckBox(this, vb); checkBox.Check(); } this.Save.Click(); }