コード例 #1
0
        public void GoogleSearchTest()
        {
            OpenHomePage();
            InitInputValue();
            SearchData data = new SearchData("test");

            FillSearchForm(data);
            SubmitSearchForm();
            Assert.AreEqual(data, driver.FindElement(By.Name("q")).GetAttribute("value"));
            //String actualAttribute = driver.FindElement(By.Name("q")).GetAttribute("value");
            AddResultInTestRail(new TestRailData("323", "232323"));



            //if (actualAttribute.Contains("test"))
            //{
            //    GoogleSearchTests.addResultForTestCase("", comment, TEST_CASE_PASSED_STATUS, "");
            //}

            //else
            //{
            //    GoogleSearchTests.addResultForTestCase("", comment, TEST_CASE_FAILED_STATUS, "");
            //}
        }
コード例 #2
0
 private void FillSearchForm(SearchData data)
 {
     driver.FindElement(By.Name("q")).SendKeys(data.Value);
 }