public void PostFeedback() { createFeedbackPage.AddFeedback("End 2 End testing test"); createFeedbackPage.SelectAllowed(); createFeedbackPage.SelectAnonymous(); createFeedbackPage.SubmitFeedback(); createFeedbackPage.WaitForFormSubmit(); createFeedbackPage.ResolveAlertDialog(); loginPage.Navigate(); Assert.Equal(driver.Url, Login.URI_Local); Assert.True(loginPage.UsernameElementDisplayed()); Assert.True(loginPage.PasswordElementDisplayed()); Assert.True(loginPage.SubmitButtonElementDisplayed()); loginPage.InsertUsername("markic"); loginPage.InsertPassword("marko1978"); loginPage.SubmitForm(); loginPage.WaitForAdministratorHomePage(); AllFedback newAllFeedbackPage = new AllFedback(driver); Assert.Equal(driver.Url, AllFedback.URI_Local); newAllFeedbackPage.EnsurePageIsDisplayed(); Assert.Equal(feedbackCount + 1, newAllFeedbackPage.GetFeedbackCount()); Dispose(); }
public PostFeedbackTest() { ChromeOptions options = new ChromeOptions(); options.AddArguments("start-maximized"); // open Browser in maximized mode options.AddArguments("disable-infobars"); // disabling infobars options.AddArguments("--disable-extensions"); // disabling extensions options.AddArguments("--disable-gpu"); // applicable to windows os only options.AddArguments("--disable-dev-shm-usage"); // overcome limited resource problems options.AddArguments("--no-sandbox"); // Bypass OS security model options.AddArguments("--disable-notifications"); // disable notifications driver = new ChromeDriver(options); loginPage = new Login(driver); loginPage.Navigate(); Assert.Equal(driver.Url, Login.URI_Local); Assert.True(loginPage.UsernameElementDisplayed()); Assert.True(loginPage.PasswordElementDisplayed()); Assert.True(loginPage.SubmitButtonElementDisplayed()); loginPage.InsertUsername("markic"); loginPage.InsertPassword("marko1978"); loginPage.SubmitForm(); loginPage.WaitForAdministratorHomePage(); allFeedbackPage = new AllFedback(driver); Assert.Equal(driver.Url, AllFedback.URI_Local); allFeedbackPage.EnsurePageIsDisplayed(); feedbackCount = allFeedbackPage.GetFeedbackCount(); loginPage.Navigate(); Assert.Equal(driver.Url, Login.URI_Local); Assert.True(loginPage.UsernameElementDisplayed()); Assert.True(loginPage.PasswordElementDisplayed()); Assert.True(loginPage.SubmitButtonElementDisplayed()); loginPage.InsertUsername("pera"); loginPage.InsertPassword("pera1978"); loginPage.SubmitForm(); loginPage.WaitForPatientHomePage(); homePage = new Home(driver); Assert.Equal(driver.Url, Home.URI_Local); Assert.True(homePage.CreateFeedbackLinkElementDisplayed()); homePage.ClickCreateFeedbackLink(); createFeedbackPage = new CreateFeedback(driver); createFeedbackPage.EnsurePageIsDisplayed(); Assert.Equal(driver.Url, CreateFeedback.URI_Local); Assert.True(createFeedbackPage.FeedbackTextboxDisplayed()); Assert.True(createFeedbackPage.RadioButtonAllowedDisplayed()); Assert.True(createFeedbackPage.RadioButtonAnonymousDisplayed()); }
public PublishFeedbackTests() { InitializeDriver(); _approvedFeedbackPage = new ApprovedFeedback(_webDriver); _loginPage = new Login(_webDriver); Login(); _allFeedbackPage = new AllFedback(_webDriver); Assert.Equal(_webDriver.Url, AllFedback.URI_Local); Assert.True(_allFeedbackPage.MaliciousPatientsLinkElementDisplayed()); }
public PatientBlockingTest() { ChromeOptions options = new ChromeOptions(); options.AddArguments("start-maximized"); options.AddArguments("disable-infobars"); options.AddArguments("--disable-extensions"); options.AddArguments("--disable-gpu"); options.AddArguments("--disable-dev-shm-usage"); options.AddArguments("--no-sandbox"); options.AddArguments("--disable-notifications"); driver = new ChromeDriver(options); homePage = new Home(driver); homePage.Navigate(); Assert.Equal(driver.Url, Home.URI_Local); loginPage = new Login(driver); loginPage.Navigate(); Assert.Equal(driver.Url, Login.URI_Local); Assert.True(loginPage.UsernameElementDisplayed()); Assert.True(loginPage.PasswordElementDisplayed()); Assert.True(loginPage.SubmitButtonElementDisplayed()); loginPage.InsertUsername("markic"); loginPage.InsertPassword("marko1978"); loginPage.SubmitForm(); loginPage.WaitForAdministratorHomePage(); allFeedbackPage = new AllFedback(driver); Assert.Equal(driver.Url, AllFedback.URI_Local); Assert.True(allFeedbackPage.MaliciousPatientsLinkElementDisplayed()); allFeedbackPage.ClickMaliciousPatientsLink(); blockMaliciousPatientsPage = new BlockMaliciousPatients(driver); blockMaliciousPatientsPage.EnsurePageIsDisplayed(); Assert.Equal(driver.Url, BlockMaliciousPatients.URI_Local); Assert.True(blockMaliciousPatientsPage.BlockMaliciousPatientButtonDisplayed()); }