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);
        }
示例#2
0
        public void Valid(string pageSource)
        {
            var command = new IsJsonCommand {Test = new SeleniteTest()};
            var driver = new WebClientDriver
                {
                    PageSource = pageSource,
                };

            command.Execute(driver, null);
        }
示例#3
0
        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);
        }