/// <summary> /// This method is used to initialize the test resources such as driver,testname,webelement helper, teststarttime and data object /// </summary> /// <param name="browser"></param> /// <param name="testDataObject"></param> private void InitializeResources(string browser, Dictionary <string, string> testDataObject) { TestName = TestContext.CurrentContext.Test.Name; Driver = GetWebDriver(WebDriverUtil.GetBrowserType(browser)); TestStartTime = DateTime.Now; this.DataObject = testDataObject; this.ScreenShotFileName = ""; WebElementHelper = new WebElementHelper(Driver); WebElementHelper.NavigateToURL(TestConfigurationBuilder.GetConfigurationValue("ApplicationSettings:URL")); }
public void VerifySearchTShirt(Dictionary <string, string> dataObject) { TestControl tc = new TestControl().GetTestResources(dataObject); tc.WebElementHelper.NavigateToURL(TestConfigurationBuilder.GetConfigurationValue("ApplicationSettings:URL")); tc.WebElementHelper.SetText(searchField, Guid.NewGuid().ToString()); tc.WebElementHelper.Click(seachButton); string messageAfterClickingSearch = tc.WebElementHelper.GetText(alertMessage); Assert.That(messageAfterClickingSearch, Does.Contain("No results were found for your search")); }
public void abc() { TestControl tc = new TestControl().GetTestResources(); tc.WebElementHelper.NavigateToURL(TestConfigurationBuilder.GetConfigurationValue("ApplicationSettings:URL")); }