public void GivenIGoToGoogleWebsite() { BasePage basePage = new BasePage(Driver); GooglePage googlePage = new GooglePage(Driver); basePage.NavigateToUrl("https://www.google.com/"); googlePage.AcceptTerms(); }
//Navigati pe https://www.google.com/. Scrieti in campul de search “paris” si apasati pe butonul Google Search. //Selectati “Images” din optiuni. Selectati prima imagine gasita. Dati Back catre pagina cu imagini. public void GoogleSearchExerciseJson() { //Arrange NavigateToUrl(TestObject.Input); GooglePage googlePage = new GooglePage(Driver); googlePage.AcceptTerms(); //Act 1 googlePage.GoogleSearch(TestObject.Others); googlePage.ClickFirstResultFromImages(); //Assert 1 Assert.IsTrue(googlePage.IsImagePanelDisplayed()); //Act 2 googlePage.ReturnToImages(); //Assert 2 Assert.IsFalse(googlePage.IsImagePanelDisplayed()); }
//Navigati pe https://www.google.com/. Scrieti in campul de search “paris” si apasati pe butonul Google Search. //Selectati “Images” din optiuni. Selectati prima imagine gasita. Dati Back catre pagina cu imagini. public void GoogleSearchExercise() { //Arrange NavigateToUrl("https://www.google.com/"); GooglePage googlePage = new GooglePage(Driver); googlePage.AcceptTerms(); //Act 1 googlePage.GoogleSearch("paris"); googlePage.ClickFirstResultFromImages(); //Assert 1 Assert.IsTrue(googlePage.IsImagePanelDisplayed()); //Act 2 googlePage.ReturnToImages(); //Assert 2 Assert.IsFalse(googlePage.IsImagePanelDisplayed()); }