public void SetUp() { Initialize(); _googleSearchPage = new GoogleSearchPage(Driver); _googleSearchPage.NavigateTo(); _input = GoogleSeachFactory.Create(); }
public void Setup() { Initialize(); Driver.Navigate().GoToUrl("http://google.com"); _googleSearchPage = new GoogleSearchPage(Driver); _word = GoogleSearchFactory.Create(); }
public void SetUp() { Initialize(); _googleSearchPage = new GoogleSearchPage(Driver); _googleSearchPage.NavigateTo(); Driver.Manage().Window.Maximize(); }
public void WhenUserSearchForBananaSong(string search) { var googleSearchPage = new GoogleSearchPage(); googleSearchPage.SearchForKeyWords(search); googleSearchPage.ConfirmSelection(); }
/// <summary> /// Constructor /// </summary> /// <param name="driverObj">WebDriver object</param> public StepDefinitions(IWebDriver driverObj, FeatureContext featurContext, ScenarioContext scenarioContext) { this._featurContext = featurContext; this._scenarioContext = scenarioContext; _driverObj = driverObj; _googleSearchStepsClassObj = new GoogleSearchPage(_driverObj, this._scenarioContext); }
public void TestApplicationsPresence() { System.Console.WriteLine("TestAppsPresence"); GoogleSearchPage googleSearchPage = new GoogleSearchPage(driver); Assert.True(googleSearchPage.isApplicationsPresent(), "Applications are not present"); Assert.Pass(); }
public void TestSearchFieldPresence() { System.Console.WriteLine("TestSearchFieldPresence"); GoogleSearchPage googleSearchPage = new GoogleSearchPage(driver); Assert.True(googleSearchPage.isSearchFieldPresent(), "Search field is not present"); Assert.Pass(); }
public SampleTestStepDefinitions() { var unity = TestBase.Unity; driver = TestBase.Driver; _googleSearchPage = unity.Resolve <GoogleSearchPage>(); _sapientGMpage = unity.Resolve <SapientGlobalMarketsPage>(); }
public void TestGoogleSearchPageSuccess() { report.Step("About to enter check cheese search results"); Thread.Sleep(5000); GoogleSearchPage googleSearchPage = web.GetSearchPage(); googleSearchPage.SendKeysToSearchTb("Cheeseasas"); googleSearchPage.ClickOnSearchBtn(); }
public void Test() { driver.Navigate().GoToUrl("https://www.google.com/?hl=en"); GoogleSearchPage page = new GoogleSearchPage(driver); page.SearchField.Type("EPAM"); page.GoogleSearchButton.Press(); page.SearchField.ClearAndType("GOOGLE"); page.SearchButton.Press(); }
public void TestGoogleSearchPageFailure() { report.Step("About to enter check cheese search results"); Thread.Sleep(10000); GoogleSearchPage googleSearchPage = web.GetSearchPage(); googleSearchPage.SendKeysToSearchTb("Cheeseasas"); googleSearchPage.ClickOnSearchBtn(); Assert.NotNull(null, "Failing the test by purpose"); }
public void TestGoogleSearchButtonPresence() { System.Console.WriteLine("TestGoogleSearchButtonPresence"); GoogleSearchPage googleSearchPage = new GoogleSearchPage(driver); Assert.True(googleSearchPage.isGoogleSearchButtonPresent(), "Google Search button is not present"); String sButtonText = googleSearchPage.getSearchButtonText(); Assert.True(sButtonText.Equals("Google претрага")); Assert.Pass(); }
public void TestGmailLinkPresence() { System.Console.WriteLine("TestGmailLinkPresence"); GoogleSearchPage googleSearchPage = new GoogleSearchPage(driver); Assert.True(googleSearchPage.isGmailLinkPresent(), "Gmail link is not present"); String sButtonText = googleSearchPage.getGmailLinkText(); Assert.True(sButtonText.Equals("Gmail")); Assert.Pass(); }
public void GoogleSearch() { GoogleSearchPage homePage = new GoogleSearchPage(driver); homePage.goToPage(); string textToSearch = "Wikipedia"; homePage.enterTextToSearchLine(textToSearch); homePage.clickOnEnter(); Assert.AreEqual("Wikipedia - Поиск в Google", driver.Title); }
public void TestSignInButtonPresence() { System.Console.WriteLine("TestSignInButtonPresence"); GoogleSearchPage googleSearchPage = new GoogleSearchPage(driver); Assert.True(googleSearchPage.isSignInButtonPresent(), "Sign in Button is not present"); String sButtonText = googleSearchPage.getSignInButtonText(); Assert.True(sButtonText.Equals("Пријавите се")); Assert.Pass(); }
public void QueryGoogle() { using (var page = new GoogleSearchPage()) { page.OpenPage(); page.Query.SetTextValue("elephant"); page.Query.SendKeys("ENTER"); page.Body.Assert.ShouldContainText("large mammals"); } Support.ScreenShot(); }
public void TestImFeelingLuckyButtonPresence() { System.Console.WriteLine("TestImFeelingLuckyButtonPresence"); GoogleSearchPage googleSearchPage = new GoogleSearchPage(driver); Assert.True(googleSearchPage.isImFeelingLuckyButtonPreent(), "Im Feeling Lucky button is not present"); String sButtonText = googleSearchPage.getImFeelingLuckyButtonTextx(); Assert.True(sButtonText.Equals("Из прве руке")); Assert.Pass(); }
public void SubmitSearchRequestAndCheckSearchResults() { GoogleSearchPage searchPage = new GoogleSearchPage(driver); string textToSearch = "Selenium IDE export to C#"; string expectedText = "Selenium IDE"; searchPage.EnterTextIntoSearchField(textToSearch); searchPage.SubmitSearchRequest(); string actualText = searchPage.GetTextFromSearchResults(5); Assert.IsTrue(actualText.Contains(expectedText)); }
public void SeleniumSearch() { GoogleSearchPage googleSearchPage = new GoogleSearchPage(_driver); googleSearchPage.SearchField.SendKeys("Selenium" + Keys.Enter); var firstFoundItem = googleSearchPage.FirstFoundItem.Text; var searchedItemName = "Selenium - Web Browser Automation"; Assert.AreNotEqual(searchedItemName, firstFoundItem); Assert.IsTrue(firstFoundItem.Contains("Selenium")); }
public void SetUp() { ChromeOptions options = new ChromeOptions(); options.PlatformName = "windows"; options.BrowserVersion = "77.0"; driver = new RemoteWebDriver(new Uri("http://192.168.100.5:21928/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(10)); driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(30); searchPage = new GoogleSearchPage(driver); }
public void Test1([Values("cheese")] string searchQuery) { GoogleSearchPage searchPage = new GoogleSearchPage(driver, timeout).Load(); searchPage.TypeInSearchField(searchQuery); GoogleSearchResultsPage resultsPage = searchPage.ClickSearchButton(); var results = resultsPage.CollectSearchResultsDescriptions(); for (int i = 0; i < results.Count; i++) { Assert.That(results[i].Contains(searchQuery)); } }
public void GoogleSearchDataRowTest(string search) { var googleSearchPage = new GoogleSearchPage(); TestManager.TestContext.WriteLine($"Test DataRow Google search for {search}"); googleSearchPage .Open() .AddSearchText(search) .ClickSearchBox() .ClickSearchButton(); Assert.IsNotNull(ConfigurationReader); }
public void GivenUserIsSignedInIntoGmail(string userName, string password) { var googleSearchPage = new GoogleSearchPage(); Browser.Instance.GoToUrl(AppSettings.Url); var signInPage = new SignInPage(); signInPage.PopulateEmailAndClickEnter(userName); var gmailAboutPage = new GmailAboutPage(); gmailAboutPage.ClickToSignIn(); signInPage.PopulateEmailAndClickEnter(userName); signInPage.EnterPassword(password); }
public void Test2([Values("cheese")] string searchQuery, [Values("wikipedia.com")] string site) { GoogleSearchPage searchPage = new GoogleSearchPage(driver, timeout).Load(); searchPage.TypeInSearchField($"{searchQuery} site:{site}"); GoogleSearchResultsPage resultsPage = searchPage.ClickEnterOnSearchField(); var links = resultsPage.CollectSearchResultsLinks(); var results = resultsPage.CollectSearchResultsDescriptions(); for (int i = 0; i < links.Count; i++) { Assert.That(links[i].Contains(site)); Assert.That(results[i].Contains(searchQuery)); } }
public void CalssInit() { ChromeOptions options = new ChromeOptions(); options.PlatformName = "windows"; options.BrowserVersion = "77"; _driver = new RemoteWebDriver(new Uri("http://192.168.1.11:47909/wd/hub"), options.ToCapabilities(), TimeSpan.FromSeconds(10)); _driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(30); _driver.Manage().Window.Maximize(); _loginPage = new LoginPage(_driver); _registrationPage = new RegistrationPage(_driver); _user = UserFactory.CreateNewUser(); _softuniPage = new SoftUniPage(_driver); _google_searchPage = new GoogleSearchPage(_driver); }
public void GoogleSearchTest() { var googleSearchPage = new GoogleSearchPage(); var s = ConfigurationReader.Settings; var search = $"{s["FieldSeven"]} {s["FieldEight"]} {s["FieldNine"]}"; TestManager.TestContext.WriteLine($"Test ExcelData Google search for {search}"); googleSearchPage .Open() .AddSearchText(search) .ClickSearchBox() .ClickSearchButton(); Assert.IsNotNull(ConfigurationReader); }
public void GoogleSearchTestContainerExample() { var googleSearchPage = new GoogleSearchPage(); googleSearchPage .Open() .AddSearchText("Dependency Injection") .ClickSearchBox() .ClickSearchButton(); var configurationReader = GetConfigurationReader(); Assert.IsNotNull(ConfigurationReader); Assert.IsTrue(configurationReader.GetConfigurationValue("RowKey") == "3"); Assert.IsTrue(configurationReader.GetConfigurationValue("FieldOne").ToLower() == "over"); Assert.IsTrue(configurationReader.GetConfigurationValue("FieldTwo").ToLower() == "the"); Assert.IsTrue(configurationReader.GetConfigurationValue("FieldThree").ToLower() == "tree"); }
public void Test_輸入關鍵字_skilltree_進行搜尋_搜尋結果第一頁應出現skilltree官網的連結() { //arrange //到google search首頁 var googleSearchPage = new GoogleSearchPage(this); googleSearchPage.Go(); //act //搜尋skilltree var keywords = "skilltree"; googleSearchPage.Search(keywords); //assert //搜尋結果第一頁應存在"http://skilltree.my/"的連結 var googleSearchResultsPage = new GoogleSearchResultsPage(this); var expectedLink = "http://skilltree.my/"; googleSearchResultsPage.FindResults(expectedLink); }
public void GoogleSearchTestSimple() { var googleSearchPage = new GoogleSearchPage(); googleSearchPage .Open() .AddSearchText("Latest News") .ClickSearchBox() .ClickSearchButton(); var configurationReader = GetConfigurationReader(); Assert.IsNotNull(configurationReader); Assert.IsTrue(configurationReader.GetConfigurationValue("RowKey") == "5"); Assert.IsTrue(configurationReader.GetConfigurationValue("FieldFour").ToLower() == "sheep"); Assert.IsTrue(configurationReader.GetConfigurationValue("FieldFive").ToLower() == "have"); Assert.IsTrue(configurationReader.GetConfigurationValue("FieldSix").ToLower() == "you"); }
public void ClassInitialize() { //RegistrationPages _driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); _wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(30)); _driver.Manage().Window.Maximize(); _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30); _loginPage = new LoginPage(_driver); _registrationPageFull = new RegistrationPageFull(_driver); _user = UserFactory.CreateRegistrationUser(); //Google search _googleSearchPage = new GoogleSearchPage(_driver); _googleSearchResults = new GoogleSearchResults(_driver); _googleFindPage = new GoogleFindPage(_driver); //SoftUniCoursePage check _softUniCoursePage = new SoftUniCoursePage(_driver); _softUniPage = new SoftUniPage(_driver); }
public void TestSearchForShowingTime() { System.Console.WriteLine("TestSearchForShowingTime"); String sShowingTimeURL = "https://www.showingtime.com/"; GoogleSearchPage googleSearchPage = new GoogleSearchPage(driver); googleSearchPage.enterSearchText("ShowingTime"); googleSearchPage.clickGoogleSearchButton(); googleSearchPage.checkUrl("search"); String sUrl = googleSearchPage.getLinkFromFirstResult(); Assert.True(sUrl.Contains(sShowingTimeURL), "Wrong Url: Expected: " + sShowingTimeURL + ". Actual: " + sUrl); googleSearchPage.clickOnLinkInFirstResult(); googleSearchPage.checkUrl(sShowingTimeURL); Assert.Pass(); }