예제 #1
0
        public void DoSomethingOnAWebPageWithSelenium2()
        {
            //Console.WriteLine("In DoSomethingOnAWebPageWithSelenium2");
            //Console.WriteLine(Driver == null ? "Driver is null" : "Driver good");
            var guineaPigPage = new GuineaPigPage(Driver, "https://saucelabs.com/");

            // verify the page title is correct - this is actually checked as part of the constructor above.
            Driver.Title.ShouldContain("I am a page title - Sauce Labs");
        }
예제 #2
0
        public void DoSomethingElseOnAWebPageWithSelenium()
        {
            //Console.WriteLine("In DoSomethingElseOnAWebPageWithSelenium");
            //Console.WriteLine(Driver == null ? "Driver is null" : "Driver good");
            var guineaPigPage = new GuineaPigPage(Driver, "https://saucelabs.com/");
            // find and click the link on the page
            guineaPigPage.ClickLink();

            // verify the browser was navigated to the correct page
            Driver.Url.ShouldContain("saucelabs.com/test-guinea-pig2.html");
        }
예제 #3
0
        public void DoSomethingElseAgainOnAWebPageWithSelenium()
        {
            //Console.WriteLine("In DoSomethingElseAgainOnAWebPageWithSelenium");
            //Console.WriteLine(Driver == null ? "Driver is null" : "Driver good");
            var guineaPigPage = new GuineaPigPage(Driver, "https://saucelabs.com/");

            // read the useragent string off the page
            var useragent = guineaPigPage.GetUserAgent();

            useragent.ShouldNotBeNull();
        }