public void BasicAuthTest() { // TODO: Add your test code here var basicAuthPage = new InternetPage(this.DriverContext); basicAuthPage.OpenHomePage(); basicAuthPage.GoToPage("login"); }
public void Exercise_11_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("status_codes"); var statuscodesPage = new StatusCodesPage(this.DriverContext); Assert.True(statuscodesPage.IsElementPresent()); }
public void Exercise_6_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("dropdown"); var dropdownPage = new DropdownPage(this.DriverContext); Assert.AreEqual("Dropdown List", dropdownPage.GetHeader()); Assert.False(dropdownPage.GetOptionProperty()); }
public void Exercise_4_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("login"); var loginPage = new LoginPage(this.DriverContext); Assert.AreEqual("Login Page", loginPage.GetHeader()); Assert.AreEqual("Login", loginPage.GetLoginButton()); }
public void Exercise_File_Upload_Test() { var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("upload"); var fileUpload = new FileUploadPage(this.DriverContext); Verify.That( this.DriverContext, () => Assert.AreEqual("File Uploader", fileUpload.GetHeader())); fileUpload.UploadFile("file-uploaded.txt"); }
public void Exercise_5_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("login"); var formFormAuthentication = new FormAuthenticationPage(this.DriverContext); formFormAuthentication.EnterUserName(BaseConfiguration.Username); formFormAuthentication.EnterPassword(BaseConfiguration.Password); formFormAuthentication.LogIn(); Assert.AreEqual("You logged into a secure area!", formFormAuthentication.GetMessageSecure()); }
public void Exercise_Checkboxes_Deselect_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("checkboxes"); var checkBoxesPage = new CheckboxesPage(this.DriverContext); Verify.That( this.DriverContext, () => Assert.AreEqual("Checkboxes", checkBoxesPage.GetHeader()), () => Assert.IsFalse(checkBoxesPage.SelectCheckBox(2))); }
public void Exercise_Uploaded_File_Download_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("download"); var fileDownload = new FileDownloadPage(this.DriverContext); Verify.That( this.DriverContext, () => Assert.AreEqual("File Downloader", fileDownload.GetHeader())); fileDownload.SaveFile("file-uploaded.txt", "file-uploaded-downloaded.txt"); fileDownload.DeleteFile("file-uploaded-downloaded.txt"); }
public void FormAuthenticationPageTestCSV(IDictionary <string, string> parameters) { var basicAuthPage = new InternetPage(this.DriverContext); basicAuthPage.OpenHomePage(); basicAuthPage.GoToPage("login"); var formFormAuthentication = new FormAuthenticationPage(this.DriverContext); formFormAuthentication.EnterUserName(parameters["user"]); formFormAuthentication.EnterPassword(parameters["password"]); formFormAuthentication.LogIn(); Verify.That( this.DriverContext, () => Assert.AreEqual(parameters["message"], formFormAuthentication.GetMessageSecure())); }
public void Exercise_File_Download_Secure_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("download_secure"); var fileDownloadSecurePage = new FileDownloadSecurePage(this.DriverContext); fileDownloadSecurePage.SignIn("admin", "admin"); Verify.That( this.DriverContext, () => Assert.AreEqual("Secure File Downloader", fileDownloadSecurePage.GetHeader())); fileDownloadSecurePage.SaveFile("some-file.txt", "new-file.txt"); fileDownloadSecurePage.DeleteFile("new-file.txt"); }
public void Exercise_7_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("tables"); var sortablePage = new SortablePage(this.DriverContext); Assert.AreEqual("Data Tables", sortablePage.GetHeader()); var lastNames = new Collection <string> { "Smith", "Bach", "Doe", "Conway" }; CollectionAssert.AreEqual(lastNames, sortablePage.GetValues()); }
public void Exercise_12_Test_Example2() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("dynamic_loading"); var example2 = new DynamicLoadingPage(this.DriverContext); example2.ClickOnExampleLink("2"); var start = new DynamicLoadingPage(this.DriverContext); start.ClickOnStartButtonExample2("start"); var finish = new DynamicLoadingPage(this.DriverContext).GetText("finish"); Assert.AreEqual("Hello World!", finish); }
public void Exercise_10_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("drag_and_drop"); var dragAndDropPageHeader = new DragAndDropPage(this.DriverContext); Assert.AreEqual("Drag and Drop", dragAndDropPageHeader.GetHeader()); var moveElementAtoElementB = new DragAndDropPage(this.DriverContext); moveElementAtoElementB.MoveElementAtoElementB(); var draganddropPage = new DragAndDropPage(this.DriverContext); Assert.AreEqual("A", draganddropPage.GetText()); }