public void NavigateTo(string url, string expectedText) { var webClientDriver = new WebClientDriver(); webClientDriver.Navigate().GoToUrl(url); Assert.Contains(url, webClientDriver.Url); Assert.Contains(expectedText, webClientDriver.PageSource); }
public void Valid(string pageSource) { var command = new IsJsonCommand {Test = new SeleniteTest()}; var driver = new WebClientDriver { PageSource = pageSource, }; command.Execute(driver, null); }
public void Invalid(string pageSource) { var command = new IsJsonCommand { Test = new SeleniteTest() }; var driver = new WebClientDriver { PageSource = pageSource, }; Assert.Throws<JsonReaderException>(() => command.Execute(driver, null)); }
public void Valid(string pageSource, string propertyName, string propertyValue) { var command = new IsJsonPropertyEqualCommand { Test = new SeleniteTest(), PropertyName = propertyName, PropertyValue = propertyValue, }; var driver = new WebClientDriver { PageSource = pageSource, }; command.Execute(driver, null); }