Ejemplo n.º 1
0
        public void RemoteWebDriverExtendedTest()
        {
            //Starting a test with the following context tags.
            reportiumClient.testStart("Reportium C# Test should success", new TestContextTags("test 1", "c#", "should success"));

            reportiumClient.testStep("Navigate to google and search PerfectoCode GitHub"); //Test step will be shown on the report ui
            driver.Navigate().GoToUrl("https://www.google.com");

            //locate the search bar and sendkeys
            driver.FindElementByName("q").SendKeys("PerfectoCode GitHub");

            //click on the search button
            driver.FindElementById("tsbb").Click();

            reportiumClient.testStep("Choose first result and validate title"); //Add as many test steps as you want
            driver.FindElementByCssSelector("#rso > div > div:nth-child(1) > div > div > div._OXf > h3 > a").Click();

            var keyword = "Perfecto"; //a keyword to validate

            //assert that Keyword is in the page title
            Assert.IsTrue(driver.Title.Contains(keyword));
        }
Ejemplo n.º 2
0
 public static void beforeStep()
 {
     reportingClient.testStep(ScenarioStepContext.Current.StepInfo.Text);
 }