public void FindsElementByIdIfUsingIsAbsent() { Expect.Once.On(mockElement).GetProperty("TagName").Will(Return.Value("form")); Expect.Once.On(mockDriver).Method("FindElement").With(By.Id("someForm")).Will(Return.Value(mockElement)); var page = new PageWithIdWithoutUsing(); AssertFindsElement(page, () => page.someForm); }
public void FindsElementByIdIfUsingIsAbsent() { mockElement.SetupGet <string>(_ => _.TagName).Returns("form"); mockDriver.Setup(_ => _.FindElement(It.Is <By>(x => x.Equals(By.Id("someForm"))))).Returns(mockElement.Object); var page = new PageWithIdWithoutUsing(); AssertFindsElement(page, () => page.someForm); }
public void FindsElementByIdIfUsingIsAbsent() { mockElement.Expects.One.GetProperty(_ => _.TagName).WillReturn("form"); mockDriver.Expects.One.Method(_ => _.FindElement(null)).With(By.Id("someForm")).WillReturn(mockElement.MockObject); var page = new PageWithIdWithoutUsing(); AssertFindsElement(page, () => page.someForm); }
public void FindsElementByIdIfUsingIsAbsent() { Expect.Once.On(mockElement).GetProperty("TagName").Will(Return.Value("form")); Expect.Once.On(mockDriver).Method("FindElement").With(By.Id("someForm")).Will(Return.Value(mockElement)); var page = new PageWithIdWithoutUsing(); AssertFindsElement(page, () => page.someForm); }