public void EditLanguageTest() { //page objects for ProfilePage ProfilePage profileObj = new ProfilePage(driver); profileObj.editLanguage(driver); }
public void SetUp() { //Append the html report file to current project path string reportPath = "C:\\Users\\Jay\\source\\repos\\FacebookProject\\Reports\\TestRunReport.html"; //Boolean value for replacing exisisting report extent = new ExtentReports(reportPath, true); //Add QA system info to html report extent.AddSystemInfo("Host Name", "YourHostName") .AddSystemInfo("Environment", "YourQAEnvironment") .AddSystemInfo("Username", "YourUserName"); //Adding config.xml file extent.LoadConfig("Extent-config.xml"); //Get the config.xml file from http://extentreports.com //Launch the browser driver = new ChromeDriver(); driver.Url = "https://www.facebook.com/"; Console.WriteLine("ChromeDriver started successfully"); loginpageObj = new LoginPage(driver); profilepageObj = new ProfilePage(driver); searchpageObj = new SearchPage(driver); homepageObj = new HomePage(driver); }
private void UniversityAdd_Event(University university) { ProfilePage profilepage = new ProfilePage(university, dbl); profilepage.RectorAdded_Event += RectorAdd_Event; GridsFrame.Navigate(profilepage); }
public void TestAbilityToReadMessages() { AuthorizationPage authorizationPage = new AuthorizationPage(Driver); ProfilePage profilePage = authorizationPage.LogIn(); profilePage.GoToMessagePage().ReadFirstMessage().GoToFriendsPage(); }
public void DeleteLanguageTest() { //page objects for ProfilePage ProfilePage profileObj = new ProfilePage(driver); profileObj.deleteLanguage(driver); }
public void ThenPasswordShouldBeChangedSuccessfully() { Driver.TurnWaitOn(); var profilePage = new ProfilePage(); profilePage.changePasswordValidation(); }
private void ProgramStatusInformationIsEdited() { var editProgramStatusPanel = _profilePage.EditProgramStatus(); _enterProgramStatusModel = new EnterProgramStatusModelBuilder().WithTestingAccommodation(true).WithMcKinneyVento(false).Build(); _profilePage = editProgramStatusPanel.Edit(_enterProgramStatusModel); }
public void WhenIAddLanguageInTheProfile() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.AddNewLanguage(); }
public void GivenEnterTheFullname() { driver = new ChromeDriver(); ProfilePage p = new ProfilePage(); p.ProfileName(driver); }
public void WhenISearchInTheSearchField() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.SearchSkill(); }
public void WhenIClickOnChangePasswordAndEnterAllValidDetails() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.ChangePassword(); }
public void WhenIUpdateCertificationInTheProfile() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.UpdateCertification(); }
public void WhenIAddDescriptionInTheDescriptionField() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.Description(); }
public void ThenIShouldBeAbleToValidateThatExistentLanguageRecordHasBeenDeleted() { TurnOnWait(); ProfilePage languageObject = new ProfilePage(); languageObject.DeleteAssertion(); }
public void ThenIShouldBeAbleToSeeTheExistentRecordUpdated() { TurnOnWait(); ProfilePage languageObject = new ProfilePage(); languageObject.EditAssertion(); }
public void ThenIShouldBeAbleToSeeANewLanguageRecordCreated() { TurnOnWait(); ProfilePage languageObject = new ProfilePage(); languageObject.AddAssertion(); }
public void WhenIUpdateLanguageInTheProfile() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.UpdateLanguage(); }
public void WhenIAddSkillInTheProfile() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.AddNewSkill(); }
public void AfterTest() { ProfilePage profile = new ProfilePage(); profile.Logout(Driver.Browser); Driver.DisposeBrowser(); }
public void When_LeadingWhiteSpace_Expect_UpdateFailure(string description, string expectedMessage) { try { ProfilePage profilePage = new ProfilePage(Driver); profilePage.DescriptionSection.UpdateDescription(description); try { Assert.Multiple(() => { Assert.That(profilePage.DescriptionSection.IsOpen(), Is.True); Assert.That(expectedMessage, Is.EqualTo(new ProfilePage(Driver).GetErrorPopUpMessage())); }); } catch (Exception e) { if (e is AssertionException) { throw; } Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}"); } } catch (Exception e) { if (e is AssertionException) { throw; } Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}"); } }
public void WhenIDeleteSkillInTheProfile() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.DeleteSkill(); }
public void When_FilterCategory_Expect_FilterSuccessful(ShareSkill expectedSkilShare, string category, string subcategory) { try { // arrange DataSetUpHelper helper = new DataSetUpHelper(ValidCredentials.Username, ValidCredentials.Password); // act // find an existing skill expectedSkilShare.Id = helper.GetOrAdd(expectedSkilShare); _setUpContext.Add(expectedSkilShare); Driver.WaitForAjax(); SearchResultPage searchResultPage = new ProfilePage(Driver).SearchBar.SearchSkill("Cucumber"); searchResultPage.RefineResultsPane.FilterByCategory(category); Driver.WaitForAjax(); searchResultPage.RefineResultsPane.FilterBySubCategory(subcategory); Driver.WaitForAjax(); // assert Assert.Multiple(() => { Assert.That(searchResultPage.ResultSection.SearchResults.SearchResultList.IsNullOrEmpty(), Is.False); Assert.True(searchResultPage.ResultSection.SearchResults.SearchResultList.First().GetSkillTitle() == expectedSkilShare.Title); }); } catch (Exception e) { if (e is AssertionException) { throw; } Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}"); } }
public void Can_publish_a_279_char_tweet() { //publish a 279-char tweet var initialTweetCount = _homePage.TweetCount; var tweetDialog = _homePage.MenuBar.OpenTweetDialog(); Assert.IsTrue(tweetDialog.Header == "Compose new Tweet", "Tweet dialog header is not as expected."); _homePage = tweetDialog.AddText(_testInput); Assert.AreEqual("See 1 new Tweet", _homePage.NewTweetNotification, "Tweet notification text is not as expected."); //verify tweets total increased by 1 on Home page _homePage = _homePage.ViewTweet(); var updatedTweetCount = _homePage.TweetCount; Assert.Greater(updatedTweetCount, initialTweetCount, $"Updated tweet count should be: {initialTweetCount+1}, " + $"but it was {updatedTweetCount}."); //verify tweets total increased by 1 on Profile page var profilePage = ProfilePage.NavigateToThisPageViaUrl(_driver); Assert.AreEqual(initialTweetCount + 1, profilePage.TweetCount, $"Updated tweet count should be: {initialTweetCount + 1}, " + $"but it was {updatedTweetCount}."); var publishedTweet = profilePage.GetTweetContent(indexInList: 0); Assert.That(publishedTweet.Contains(_testInput), "The tweet does not contain the expected text."); }
public void GetPublicProfiles() { var appId = Guid.NewGuid(); var core = new UserCore(); for (int i = 0; i < 5; i++) { var page = new ProfilePage() { ApplicationIdentifier = appId, Handle = Guid.NewGuid().ToString(), OwnerIdentifier = Guid.NewGuid(), }; core.Save(page); } var app = new Application() { Identifier = appId, }; var profiles = core.PublicProfiles(app); Assert.AreEqual <int>(5, profiles.Count()); }
public void EditProfileFullName() { HomePage homePage = new HomePage(Driver); ProfilePage profilePage = new ProfilePage(Driver); UserHelper jsonConverter = new UserHelper(); User user = jsonConverter.GetUser(); SignInPage signInPage = new SignInPage(Driver); RightNavMenu rightNavMenu = new RightNavMenu(Driver); var fName = $"FN{DateTime.Now.ToString("yyyyMMddHHmmss")}"; var lName = $"LN{DateTime.Now.ToString("yyyyMMddHHmmss")}"; homePage .ClickAccountIcon(); rightNavMenu .ClickSignInLink(); signInPage .FillInEmailAddressInput(user) .FillInPasswordInput(user) .ClickSignInButton(); profilePage .ClickAccountIconForSignInUser() .ClickAccountLink() .ClickProfilePasswordMenuItem() .EditFullNameAndSave(fName, lName) .ClickSaveButton(); jsonConverter.ReplaceUserDataInJson(user, fName, lName); Assert.AreEqual($"{fName} {lName}", profilePage.GetFullName(), "User Name is changed"); }
public void When_ValidEducationDetails_Expect_AdddSuccessful(Education education) { try { DataSetUpHelper helper = new DataSetUpHelper(ValidCredentials.Username, ValidCredentials.Password); // act ProfilePage profilePage = new ProfilePage(Driver); // reload profilePage.Open(); profilePage.MainSection.EnterEducationDetails(education); Driver.WaitForAjax(); education.Id = helper.GetOrAdd(education); _setUpContext.Add(education); // assert Driver.WaitForAjax(); Assert.IsTrue(profilePage.MainSection.SearchForRow(education)); Assert.That( "Education has been added", Is.EqualTo(profilePage.GetSuccessPopUpMessage())); } catch (Exception e) { if (e is AssertionException) { throw; } Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}"); } }
public void ProfilePageUpdate() { var page = new ProfilePage() { ApplicationIdentifier = Guid.NewGuid(), Handle = Guid.NewGuid().ToString(), OwnerIdentifier = Guid.NewGuid(), }; var core = new UserCore(); core.Save(page); var newPage = new ProfilePage() { ExistingHandle = page.Handle, Handle = Guid.NewGuid().ToString(), ApplicationIdentifier = page.ApplicationIdentifier, OwnerIdentifier = page.OwnerIdentifier, }; core.Save(newPage); var get = core.Get(page); Assert.IsNull(get); get = core.Get(newPage); Assert.AreEqual <string>(newPage.Handle, get.Handle); Assert.AreEqual <Guid>(newPage.ApplicationIdentifier, get.ApplicationIdentifier); Assert.AreEqual <Guid>(newPage.OwnerIdentifier, get.OwnerIdentifier); }
public void GoHome() { LoginPage.LoginWithDefault(); ProfilePage.GoTo(); Navbar.GoHome(); Assert.IsTrue(DashboardPage.IsAt); }
public void WhenIDeleteEducationInTheProfile() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.DeleteEducation(); }
public void WhenIAddEducationInTheProfile() { Driver.TurnOnWait(); var profilePage = new ProfilePage(); profilePage.AddNewEducation(); }
public void When_FourLanguagesAdded_Expect_AddDisabled() { try { // arrange DataSetUpHelper helper = new DataSetUpHelper(ValidCredentials.Username, ValidCredentials.Password); foreach (var i in new string[] { "1", "2", "3" }) { var language = ReadFromExcel(i); language.Id = helper.GetOrAdd(language); _setUpContext.Add(language); } // act ProfilePage profilePage = new ProfilePage(Driver); // reload profilePage.Open(); var newLanguage = ReadFromExcel("4"); profilePage.MainSection.EnterLanguageDetails(newLanguage); Driver.WaitForAjax(); newLanguage.Id = helper.GetOrAdd(newLanguage); _setUpContext.Add(newLanguage); // assert Driver.WaitForAjax(); Assert.That(profilePage.MainSection.IsAddRowButtonEnbaled(), Is.False); } catch (Exception e) { if (e is AssertionException) { throw; } Assert.Fail($"Error has occurred\nMessage : {e.Message}\nStackTrace : {e.StackTrace}"); } }
private void GoToTheStudentProfilePage() { _profilePage = _homePage.TopMenu.GoToStudentsPage().GoToProfilePage(); }
private void VisitThatStudentsProfilePage() { _studentIndex = _homePage.TopMenu.GoToStudentsPage(); _profilePage = _studentIndex.GoToProfilePage(); }
private void ProgramStatusInputted() { var programStatusModel = new EnterProgramStatusModelBuilder().Build(); _profilePage = _programStatusPage.InputProgramStatus(programStatusModel); }