Esempio n. 1
0
        public static void cleanup()
        {
            Browser b = Pegasus.LoginCom("seloffice");
            LocatorReader c = new LocatorReader("Common.xml");
            LocatorReader i = new LocatorReader("iFrame.xml");
            Thread.Sleep(500);

            b.Sequence
                .MoveToElement(b.FindElement((c.Get("name-dropdown"))))
                .Click(b.FindElement(c.Get("admin-link")))
                .Build().Perform();
            Thread.Sleep(2000);

            b.MouseOver(i, "integration-tab")
                .Click(i, "iframe-link")
                .Wait(1)
                .Click(i, "delete")
                .Wait(1)
                .AlertAccept()
                .Wait(1);
            Thread.Sleep(2000);

            b.Click(i, "delete")
                .Wait(1)
                .AlertAccept()
                .Wait(1);
            Thread.Sleep(2000);

            b.Quit();
        }
Esempio n. 2
0
        public static void setup(TestContext testContext)
        {
            Browser b = Pegasus.LoginCom("seloffice");
            LocatorReader c = new LocatorReader("Common.xml");
            LocatorReader i = new LocatorReader("iFrame.xml");
            Thread.Sleep(500);

            b.Sequence
                .MoveToElement(b.FindElement((c.Get("name-dropdown"))))
                .Click(b.FindElement(c.Get("admin-link")))
                .Build().Perform();
            Thread.Sleep(2000);

            b.MouseOver(i, "integration-tab")
                .Click(i, "iframe-link")
                .Wait(1)
                .Click(i, "create-button")
                .FillForm(i, "iframe-name", "iFrame 1")
                .FillForm(i, "username", "Email")
                .FillForm(i, "password", "Password")
                .FillForm(i, "login", "https://www.dropbox.com/login")
                .FillForm(i, "forgot", "https://www.dropbox.com/forgot?email_from_login="******"create", "https://www.dropbox.com/")
                .Click(i, "appear")
                .Click(i, "save-button");
            Thread.Sleep(2000);

            b.Click(i, "create-button")
                .FillForm(i, "iframe-name", "iFrame 2")
                .FillForm(i, "username", "Email")
                .FillForm(i, "password", "Password")
                .FillForm(i, "login", "https://www.dropbox.com/login")
                .FillForm(i, "forgot", "https://www.dropbox.com/forgot?email_from_login="******"create", "https://www.dropbox.com/")
                .Click(i, "appear")
                .Click(i, "save-button");
            Thread.Sleep(2000);

            b.Quit();
        }
 public void Initialize()
 {
     Browser = Pegasus.LoginCom("tseaa");
     _management = new LocatorReader("LeadClientManagement.xml");
 }
Esempio n. 4
0
 public void Initialize()
 {
     Browser = Pegasus.LoginCom("selcorp");
     _themes = new LocatorReader("Themes.xml");
     _rand = new Random();
 }
Esempio n. 5
0
 public void TestInitialize()
 {
     i = new LocatorReader("iFrame.xml");
     Browser = Pegasus.LoginCom("seloffice");
     Thread.Sleep(500);
 }
Esempio n. 6
0
        private void CreateClient()
        {
            var merger = new LocatorReader("Merger.xml");
            var randomName = "Client " + new Random().Next(int.MaxValue);

            Browser.MouseOver(merger.Get("ClientsTab"))
                .Click(merger.Get("CreateClient"))
                .DropdownSelectByText(merger.Get("Status"), "New")
                .DropdownSelectByText(merger.Get("Responsibility"), "Test Test")
                .Click(merger.Get("CompanyDetailsTab"))
                .FillForm(merger.Get("CompanyDBAName"), randomName)
                .Click(merger.Get("Save"));
            Thread.Sleep(2000);
            Assert.AreEqual("Client saved successfully.",
                Browser.FindElement(Common.Get("flash-message")).Text);

            TestContext.Properties["client "] = randomName;
        }
Esempio n. 7
0
        public static void setup(TestContext testContext)
        {
            Browser b = Pegasus.LoginCom("seloffice");
            LocatorReader d = new LocatorReader("DigitalSignatures.xml");
            Thread.Sleep(500);

            b.Click(d, "clients-tab")
                .Wait(1)
                .Click(d, "Test1")
                .Wait(1)
                .Click(d, "file-share")
                .Wait(2);

            while (b.ElementsVisible(d, "file-delete"))
            {
                b.Click(d, "file-delete")
                    .Wait(3);
            }

            b.Click(d, "pdfs-tab")
                .Wait(1)
                .Click(d, "share-link")
                .Click(d, "sig-require")
                .Click(d, "notify")
                .Click(d, "share-button")
                .Wait(1)
                .AlertAccept()
                .Wait(5);

            b.Quit();
        }
Esempio n. 8
0
 /// <summary>
 ///     Upload a file to the selected element.
 /// </summary>
 /// <param name="r">The LocatorReader instance.</param>
 /// <param name="node">The node to get in the LocatorReader.</param>
 /// <param name="filename">The name of the file in Resources/</param>
 /// <returns>The current Browser instance.</returns>
 public Browser UploadFile(LocatorReader r, string node, string filename)
 {
     return UploadFile(r.Get(node), filename);
 }
Esempio n. 9
0
 public Browser Click(LocatorReader r, string node)
 {
     return Click(r.Get(node));
 }
Esempio n. 10
0
 public Browser ClearForm(LocatorReader r, string node)
 {
     return ClearForm(r.Get(node));
 }
Esempio n. 11
0
 public void TestInitialize()
 {
     Browser = Pegasus.LoginMyPeg ("seloffice");
     //Browser = Pegasus.LoginCom("seloffice");
     _product = new LocatorReader("ProductManagement.xml");
     Thread.Sleep(500);
 }
Esempio n. 12
0
 public void TestInitialize()
 {
     _r = new LocatorReader("UniversalResidual.xml");
     Browser = Pegasus.Login("selcorp");
 }
Esempio n. 13
0
 public void Initialize()
 {
     Browser = Pegasus.LoginCom("selcorp");
     _integrated = new LocatorReader("IntegratedResidual.xml");
 }
Esempio n. 14
0
 public void TestInitialize()
 {
     s = new LocatorReader("SalesAgent1.xml");
     // Browser = Pegasus.LoginCom("brianagent");
     Browser = Pegasus.LoginMyPeg("brianagent");
     Thread.Sleep(500);
 }
Esempio n. 15
0
 public void TestInitialize()
 {
     doc = new LocatorReader("DocumentManager.xml");
     Browser = Pegasus.LoginCom("seloffice");
     Thread.Sleep(500);
 }
Esempio n. 16
0
 public ReadOnlyCollection<IWebElement> FindElements(LocatorReader r, string node)
 {
     return FindElements(r.Get(node));
 }
Esempio n. 17
0
 public Browser MouseOver(LocatorReader r, params string[] nodes)
 {
     return MouseOver(nodes.ToList().Select(e => r.Get(e)).ToArray());
 }
Esempio n. 18
0
 public Browser DropdownSelectByIndex(LocatorReader r, string node, int index)
 {
     return DropdownSelectByIndex(r.Get(node), index);
 }
Esempio n. 19
0
        public static void cleanup()
        {
            Browser b = Pegasus.LoginCom("seloffice");
            LocatorReader d = new LocatorReader("DigitalSignatures.xml");
            Thread.Sleep(500);

            b.Click(d, "clients-tab")
                .Wait(1)
                .Click(d, "brian-client")
                .Wait(1)
                .Click(d, "file-share")
                .Wait(2)
                .Click(d, "file-delete")
                .Wait(1)
                .Quit();
        }
Esempio n. 20
0
 public Browser DropdownSelectByText(LocatorReader r, string node, string text)
 {
     return DropdownSelectByText(r.Get(node), text);
 }
Esempio n. 21
0
 public void TestInitialize()
 {
     d = new LocatorReader("DigitalSignatures.xml");
     Browser = Pegasus.LoginCom("seloffice");
     Thread.Sleep(500);
 }
Esempio n. 22
0
 public Browser DropdownSelectByValue(LocatorReader r, string node, string value)
 {
     return DropdownSelectByValue(r.Get(node), value);
 }
Esempio n. 23
0
 public void TestInitialize()
 {
     _m = new LocatorReader("MerchantPortal.xml");
 }
Esempio n. 24
0
 public int ElementCount(LocatorReader r, string node)
 {
     return ElementCount(r.Get(node));
 }
Esempio n. 25
0
 public bool ElementsVisible(LocatorReader r, params string[] nodes)
 {
     return ElementsVisible(nodes.ToList().Select(e => r.Get(e)).ToArray());
 }
Esempio n. 26
0
 public Browser FillFormReplace(LocatorReader r, string node, string value)
 {
     return FillFormReplace(r.Get(node), value);
 }
Esempio n. 27
0
 public void LoadCommon()
 {
     Common = new LocatorReader("Common.xml");
 }
Esempio n. 28
0
 public IWebElement FindElement(LocatorReader r, string node)
 {
     return FindElement(r.Get(node));
 }
Esempio n. 29
0
 public void TestInitalize()
 {
     _c = new LocatorReader("CorporatePortal2.xml");
     Browser = Pegasus.LoginCom("selcorp");
 }
Esempio n. 30
0
 public void Initialize()
 {
     Browser = Pegasus.LoginCom("tseaa");
     _merger = new LocatorReader("Merger.xml");
 }