コード例 #1
0
        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);
            }
        }
コード例 #2
0
 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);
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: Joerg-Busse/JksTstPrj01
        public void ExecuteTest()
        {
            PageObjects page = new PageObjects();

            page.FillUserForn("Jenkins ci");

            Console.WriteLine("Test wird ausgeführt");
        }
コード例 #4
0
        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");
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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");
        }
コード例 #7
0
        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);
        }
コード例 #8
0
 /// <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
     });
 }
コード例 #9
0
        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}'");
            }
        }
コード例 #10
0
 protected virtual void Dispose(bool disposing)
 {
     if (IsDisposed)
     {
         return;
     }
     if (PageObjects != null)
     {
         PageObjects.Dispose();
     }
     PageObjects = null;
     IsDisposed  = true;
     if (disposing)
     {
         GC.SuppressFinalize(this);
     }
 }
コード例 #11
0
    // 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;
        }
    }
コード例 #12
0
        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);
            }
        }
コード例 #13
0
 public IElementAssert Exist(PageObjects.Locators.By.jQueryBy findExpression, string message = null, TimeSpan maxWait = default(TimeSpan))
 {
     return Exist(() => Find.Element(findExpression, maxWait), message);
 }
コード例 #14
0
 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);
         });
 }
コード例 #15
0
 public void WhenUserClicksOnForgotPassword()
 {
     CustomControls.click(PageObjects.Login_Screen(6), propertytype.CssSelector);
 }
コード例 #16
0
 public void WhenUserClicksLoginButton()
 {
     CustomControls.click(PageObjects.Login_Screen(4), propertytype.CssSelector);
     delayfor.delay();
 }
コード例 #17
0
 public void ThenUserClickOnCreateANewAccount()
 {
     CustomControls.click(PageObjects.Create_new_Account(1), propertytype.XPath);
 }