public void Elements()
 {
     PageNavigator.GoToPage(ObjectInstances.Config.GetURL());
     SendQuery.ClearText(By.Name("search"));
     SendQuery.Queries(By.Name("search"), "selenium");
     GoToLinkAndClick.ClickLink(By.Name("search"));
     if (ObjectInstances.Driver != null)
     {
         ClosePage.PageDispose();
     }
 }
Example #2
0
        // [DataSource("TestData")]
        public void SimpleMethod()
        {
            //TestContext context = null;
            PageNavigator.GoToPage(ObjectInstances.Config.GetURL());

            /* SearchElements.IdName(ObjectInstances.Config.GetUsername());
             * // SearchElements.IdPassword(ObjectInstances.Config.GetPassWord());
             * SearchElements.IdsendKeys();*/
            string pageTitle = ObjectInstances.Driver.Title;

            // var user = context.DataRow["Arg1"];
            if (pageTitle.Equals(ObjectInstances.Config.GetTitle()))
            {
                Console.WriteLine("Test is successful.");
            }
            else
            {
                Console.WriteLine("Test fails.... Alert developer.");
            }
            if (ObjectInstances.Driver != null)
            {
                ClosePage.PageDispose();
            }
        }