public void Test3() { GooglePage gp = new GooglePage(driver); driver.Navigate().GoToUrl("http://blazedemo.com/"); gp.clickHomeLink(); }
public void CheckGooglePage() { var returnValue = GooglePage.CheckGooglePage(); var expectedValue = "Gmail"; Assert.AreEqual(expectedValue, returnValue); }
public void FeelingLuckyInitializationTest() { var google = new GooglePage(this.driver); google.LuckyClick(); Assert.AreEqual(this.driver.Title, google.LuckyInitTitle); }
public void ThenIShouldBeAbleToExpandTheFirstImage() { GooglePage googlePage = new GooglePage(Driver); googlePage.ClickFirstResultFromImages(); Assert.IsTrue(googlePage.IsImagePanelDisplayed()); }
public void GooglePageInitializationTest() { var google = new GooglePage(this.driver); Assert.AreEqual(this.driver.Title, google.InitTitle); Assert.AreEqual(google.GetSearchBoxValue(), string.Empty); }
public void SearchAndAssertSearchCountTest(string wordToSearch, long searchResultsCount) { var gp = new GooglePage(Driver); gp.VerifyIsOpened(); gp.SearchFor(wordToSearch); var actualSearchResultsCount = gp.GetSearchResultsCount(); Console.WriteLine($"Asserting results more than :: '{searchResultsCount}'"); Assert.AreEqual(true, actualSearchResultsCount > searchResultsCount, $"Search count '{actualSearchResultsCount}' are less than '{searchResultsCount}'"); Console.WriteLine($"Asserting results contain :: '{wordToSearch}'"); var i = 1; Assert.Multiple(() => { foreach (var res in gp.GetAllResultsTextList()) { Assert.AreEqual(true, res.ToLower().Contains(wordToSearch.ToLower()), $"Search result '{i}' doesn't contain '{wordToSearch}' word"); i++; } }); }
public void ThenReturnToTheResultsPage() { GooglePage googlePage = new GooglePage(Driver); googlePage.ReturnToImages(); Assert.IsFalse(googlePage.IsImagePanelDisplayed()); }
public void Search() { var gp = new GooglePage(Driver); gp.GoTo(); gp.Search("stuff"); }
[TestMethod] // Not Signed in fail public void CanGoOnGooglePage() { GooglePage onGooglePage = onFooterPage.CanGoToGooglePage(); Assert.IsTrue(onGooglePage.IsAtGooglePage()); Debug.Write("Google Page on FireFox"); }
public void SearchTest() { const string searchTerm = "Hello World"; var google = new GooglePage(this.driver); google.Search(searchTerm); Assert.IsTrue(this.driver.Title.Contains(searchTerm)); }
private void GoToTheHotlinePageFromGoogleSearch() { var googlePage = new GooglePage(WebDriver); googlePage.Navigate(); googlePage.MakeSearchRequest("hotline"); googlePage.GoToTheFirstSearchLink(); }
public void Teste() { GooglePage googlePage = new GooglePage(); googlePage.NavigationToPage(); googlePage.Pesquisar("ps3brasil"); googlePage.TakeScreeshot("Teste", ErrorPath, OpenQA.Selenium.ScreenshotImageFormat.Jpeg); }
public void CalssInit() { _driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); _driver.Manage().Window.Maximize(); _googlePage = new GooglePage(_driver); _seleniumhq = new SeleniumHQ(_driver); }
public void GivenIGoToGoogleWebsite() { BasePage basePage = new BasePage(Driver); GooglePage googlePage = new GooglePage(Driver); basePage.NavigateToUrl("https://www.google.com/"); googlePage.AcceptTerms(); }
public void SetUp() { Initialize(); Driver.Manage().Window.Maximize(); Driver.Navigate().GoToUrl("https://www.google.com/"); _googlePage = new GooglePage(Driver); }
public void Selenium_dev_site_lookup(Browsers browser, string lang) { Driver = WebDriverFactory.GetLocalWebDriver(browser, lang); BasePage StartPage = new BasePage(Driver); GooglePage Google = StartPage.Navigate <GooglePage>("https://www.google.com/"); SearchResultPage SearchResult = Google.Search("webdriver documentation for selenium"); SearchResult.FirstLinkOfSearchResult.Should().Be("https://www.selenium.dev/documentation/en/webdriver/"); }
public void Verify_FirstGoogleResult_When_SearchingForSelenium() { GooglePage googlePage = new GooglePage(Driver); googlePage.SearchByEnteredText("Selenium" + Keys.Enter); googlePage.ClickOnGoogleResultLinkByNumber(1); Assert.AreEqual("SeleniumHQ Browser Automation", Driver.Title); }
public void CalssInit() { _driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); _driver.Manage().Window.Maximize(); _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); _googlePage = new GooglePage(_driver); _softuniPage = new SoftuniPage(_driver); }
public static void Main(string[] args) { //FirefoxProfile profile = new FirefoxProfile(); //profile.AddExtension(@"..\..\Extensions\adblock_firefox.xpi"); //FirefoxDriver driver = new FirefoxDriver(profile); ChromeOptions options = new ChromeOptions(); options.AddExtension(@"..\..\Extensions\adblock_chrome.crx"); ChromeDriver driver = new ChromeDriver(options); driver.Manage().Window.Maximize(); driver.Url = @"http://www.findazip.com/"; NavigationPage nav = new NavigationPage(driver); nav.citiesWithV.Click(); TargetPage target = new TargetPage(driver); var cities = target.Cities; ContentPage content = new ContentPage(driver); var citiesURLs = new List <string>(); for (int i = 0; i < 3; i++) { citiesURLs.Add(cities[i].GetAttribute("href")); } var citiesForClick = new List <CityInfo>(); foreach (var citiesUrL in citiesURLs) { driver.Url = citiesUrL; citiesForClick.Add(new CityInfo(content.Name.Text, content.State.Text, content.Zip.Text, content.Longitude.Text, content.Latidude.Text)); } driver.Url = @"https://www.google.bg/maps/"; GooglePage google = new GooglePage(driver); foreach (var cityInfo in citiesForClick) { //google.Search.Clear(); //google.Search.SendKeys($"{cityInfo.Latitude}, {cityInfo.Longitude}"); //google.Search.SendKeys(Keys.Enter); driver.Url = $"https://www.google.bg/maps/@{cityInfo.Latitude},{cityInfo.Longitude},15z"; Thread.Sleep(5000); var screenshot = ((ITakesScreenshot)driver).GetScreenshot(); screenshot.SaveAsFile($"{cityInfo.Name}-{cityInfo.State}-{cityInfo.Zip}.jpg", ScreenshotImageFormat.Jpeg); } }
public void GoogleSearchPageObjectModel() { var search = new GooglePage(_remoteWebDriver); search.Maximaze(); search.Navigate(); search.SearchForSelenium.SendKeys("selenium"); search.ClickSearchButton.Click(); search.AssertLink("Selenium - Web Browser Automation"); }
public void GoToWikiFromGoogleTest() { var Google = new GooglePage(); Google.GoToResultPage(); var ResultGoogle = new ResultPage(); var Wiki = ResultGoogle.GoToWiki(); Wiki.AssertIsOpen(); }
public void TestSearchPage() { GooglePage GooglePage = new GooglePage(Driver); GooglePage.Driver.Url = "https://www.google.com/"; GooglePage.FillSearchForm(); GooglePage.AssertFormResult(); }
public static void B_GetAttributeOnObject() { var googlePage = new GooglePage(); IEnumerable <PageUrlAttribute> pageUrlAttribute = googlePage.GetType().GetCustomAttributes <PageUrlAttribute>(); pageUrlAttribute .Should() .HaveCount(1); }
public void NavigateToEtGeorgiShoulBeProcessed() { //// Arrange var googlePage = new GooglePage(this.driver); //// Act googlePage.Open(); //.....................// тук искам да натисна бутона ServiciesButton. }
public void GoogleSearch() { GooglePage googlePageTry = new GooglePage(Driver); var user = GoogleFromFactories.Create(); googlePageTry.FillGoogleSearch(user); googlePageTry.WaitForLoad(); googlePageTry.AssertHeadlineResult(googlePageTry.SeleniumHeadlineResult); }
public void CountCheese() { var googlePage = new GooglePage(); googlePage.OpenGooglePage(); googlePage.SearchOnGoogle("cheese"); var cheeseAmount = googlePage.GetSearchResultNumber(); Assert.AreEqual(777, cheeseAmount, "There is too much cheese on the internet"); googlePage.Close(); }
public void Google() { IWebDriver driver = new ChromeDriver(Environment.CurrentDirectory); GooglePage page = new GooglePage(driver); page.GoToPage(); System.Threading.Thread.Sleep(6000); page.Search("google"); System.Threading.Thread.Sleep(6000); driver.Close(); }
public void EntaoEuLocalizoOTexto() { string searchText = "Blog netcoders"; string expectedTitle = ".NET Coders | Um dos maiores e mais ativos grupos de estudos de ..."; GooglePage gPage = new GooglePage(); gPage.Search(searchText); Assert.AreEqual(expectedTitle, gPage.firstResult.Text); }
//Try to go to LinkedIn website through search results in Google.com public void SearchLinkedIn() { driver.Url = "https://www.google.com/"; var googlePage = new GooglePage(driver); Assert.AreEqual(true, googlePage.SearchBar.Displayed); googlePage.SendQueryToSearchBar("LinkedIn"); googlePage.SubmitSearch(); Assert.AreEqual(true, driver.Title.Contains("LinkedIn")); googlePage.GoToPageFoundInSearchResults("linkedin.com"); }
public void Setup() { var opts = new ChromeOptions(); opts.AddArgument("--start-maximized"); opts.AddArgument("--headless"); _driver = new ChromeDriver(opts); _googlePage = new GooglePage(_driver); _elementFinder = new ElementFinder <GooglePage>(); _driver.Navigate().GoToUrl("https://google.com"); }