public void ThenUserShouldLandOnThePageWithLink(string home) { //Globalelements.Actualresult = PropertiesCollection.ngdriver.Url; // Globalelements.Expectedresult = "https://azdevacclaim.azurewebsites.net/Home/Home.aspx"; // Assertions.assertionequals(Globalelements.Actualresult, Globalelements.Expectedresult); implicitwait.ImplicitWait(2); //CustomControls.click("#ctl00_AdminMenu_MenuInMenu1_btnHome", propertytype.CssSelector); try { Globalelements.Actualresult = CustomControlGets.GettextfromLabel(PageObjects.Login_Screen(5), propertytype.CssSelector); } catch (Exception e) { flag = 1; } finally { Globalelements.Expectedresult = home; if (flag == 1) { Console.WriteLine(" Test case failed, the User is not able to Login"); } Assertions.assertionequals(Globalelements.Actualresult, Globalelements.Expectedresult); } }
public void ThenTheSamePageShouldShowTheLabel(string get_start_label) { Globalelements.Actualresult = CustomControlGets.GettextfromLabel(PageObjects.Create_new_Account(2), propertytype.XPath); Globalelements.Expectedresult = get_start_label; Assertions.assertionequals(Globalelements.Expectedresult, Globalelements.Actualresult); Console.WriteLine(Globalelements.Actualresult); }
public void ExecuteTest() { PageObjects page = new PageObjects(); page.FillUserForn("Jenkins ci"); Console.WriteLine("Test wird ausgeführt"); }
public void FolderSharedValidation() { driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20); PageObjects drop = new PageObjects(driver); //Console.WriteLine(drop.ValidateEmail()); StringAssert.Contains(ConfigurationManager.AppSettings["sharedEmailId"], drop.ValidateEmail(), "Test case is passed"); Assert.IsTrue(drop.UploadFiles(), "Test Case is passed"); }
public void GivenUserEntersSiteIdUsernameAndPasswordAsBelow(Table credentials) { PropertiesCollection.ngdriver.Manage().Window.Maximize(); dynamic Credentials = credentials.CreateDynamicInstance(); CustomControls.Entertext(PageObjects.Login_Screen(1), Credentials.site_id, propertytype.CssSelector); CustomControls.Entertext(PageObjects.Login_Screen(2), Credentials.user_id, propertytype.CssSelector); CustomControls.Entertext(PageObjects.Login_Screen(3), Credentials.password, propertytype.CssSelector); Console.WriteLine(PropertiesCollection.ngdriver.Title); }
public void LoginValidation() { driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20); PageObjects drop = new PageObjects(driver); drop.SignInClick(); drop.Email(); drop.Password(); drop.RememberMe(); StringAssert.Contains("Sign out", drop.LoginButton(), "Test case is passed"); }
public void ThenUserEntersBelowInformation(Table user_info) { dynamic User_info = user_info.CreateDynamicInstance(); CustomControls.Entertext(PageObjects.Create_new_Account(6), User_info.Email, propertytype.CssSelector); CustomControls.Entertext(PageObjects.Create_new_Account(7), User_info.Password, propertytype.CssSelector); CustomControls.Entertext(PageObjects.Create_new_Account(8), User_info.Confirm_password, propertytype.CssSelector); CustomControls.click(PageObjects.Create_new_Account(9), propertytype.XPath); CustomControls.click(PageObjects.Create_new_Account(10), propertytype.XPath); }
/// <summary> /// Populates a PageObjectEntry with the data from the scanned HTML nodes. /// </summary> /// <param name="htmlNode">The node to add to the PageObject collection.</param> void PopulatePageObject(HtmlNode htmlNode) { PageObjects.Add( new PageObjectEntry() { ClassNames = GetClassesAsList(htmlNode), CssSelector = GetCssSelector(htmlNode), Id = htmlNode.Id != "" ? htmlNode.Id : null, Link = GetHref(htmlNode), NameAttribute = htmlNode.Attributes.Contains("name") ? htmlNode.Attributes["name"].Value : null, ObjectName = GetObjectName(htmlNode), TagName = htmlNode.Name != "" ? htmlNode.Name : null, XPath = htmlNode.XPath != "" ? htmlNode.XPath : null }); }
public void NewFolderCreatedValidation() { driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20); PageObjects drop = new PageObjects(driver); drop.GetListMenu(); drop.SubFolderList(); try { StringAssert.AreEqualIgnoringCase(ConfigurationManager.AppSettings["Foldername"], drop.CreateShareNewFolder(), "Test case is passed"); } catch (FileNotFoundException e) { Console.WriteLine($"The file was not found: '{e}'"); } }
protected virtual void Dispose(bool disposing) { if (IsDisposed) { return; } if (PageObjects != null) { PageObjects.Dispose(); } PageObjects = null; IsDisposed = true; if (disposing) { GC.SuppressFinalize(this); } }
// Initialize the variables references private void InitReferences() { // Get the animator reference anim = GetComponent <Animator>(); // Get usefull references for all 3 book pages bookPages = new PageObjects[3]; for (int i = 0; i < 3; i++) { PageObjects page = new PageObjects(); Transform pageTransform = pagesParent.Find("Page" + i); page.page = pageTransform; page.RectoImage = pageTransform.Find("Recto").Find("CanvasRecto").GetComponent <Image>(); page.VersoImage = pageTransform.Find("Verso").Find("CanvasVerso").GetComponent <Image>(); bookPages[i] = page; } }
public void ThenUserShouldLandOnThePageWithLink(string analystics) { implicitwait.ImplicitWait(2); try { Globalelements.Actualresult = CustomControlGets.GettextfromLabel(PageObjects.Login_Screen(5), propertytype.XPath); } catch (Exception e) { flag = 1; } finally { Globalelements.Expectedresult = analystics; Console.WriteLine(Globalelements.Actualresult); if (flag == 1) { Console.WriteLine(" Test case failed, the User is not able to Login"); } Assertions.assertionequals(Globalelements.Actualresult, Globalelements.Expectedresult); } }
public IElementAssert Exist(PageObjects.Locators.By.jQueryBy findExpression, string message = null, TimeSpan maxWait = default(TimeSpan)) { return Exist(() => Find.Element(findExpression, maxWait), message); }
public IElementAssert ConformTo(PageObjects.Locators.By.jQueryBy findExpression, Action<IEnumerable<IWebElement>> assertion, TimeSpan maxWait = default(TimeSpan)) { return ConformTo(() => { var elements = Find.Elements(findExpression, maxWait); assertion(elements); }); }
public void WhenUserClicksOnForgotPassword() { CustomControls.click(PageObjects.Login_Screen(6), propertytype.CssSelector); }
public void WhenUserClicksLoginButton() { CustomControls.click(PageObjects.Login_Screen(4), propertytype.CssSelector); delayfor.delay(); }
public void ThenUserClickOnCreateANewAccount() { CustomControls.click(PageObjects.Create_new_Account(1), propertytype.XPath); }