예제 #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();
        }
예제 #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");
 }
예제 #4
0
 public void Initialize()
 {
     Browser = Pegasus.LoginCom("selcorp");
     _themes = new LocatorReader("Themes.xml");
     _rand = new Random();
 }
예제 #5
0
 public void TestInitialize()
 {
     i = new LocatorReader("iFrame.xml");
     Browser = Pegasus.LoginCom("seloffice");
     Thread.Sleep(500);
 }
예제 #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;
        }
예제 #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();
        }
예제 #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);
 }
예제 #9
0
 public Browser Click(LocatorReader r, string node)
 {
     return Click(r.Get(node));
 }
예제 #10
0
 public Browser ClearForm(LocatorReader r, string node)
 {
     return ClearForm(r.Get(node));
 }
예제 #11
0
 public void TestInitialize()
 {
     Browser = Pegasus.LoginMyPeg ("seloffice");
     //Browser = Pegasus.LoginCom("seloffice");
     _product = new LocatorReader("ProductManagement.xml");
     Thread.Sleep(500);
 }
예제 #12
0
 public void TestInitialize()
 {
     _r = new LocatorReader("UniversalResidual.xml");
     Browser = Pegasus.Login("selcorp");
 }
예제 #13
0
 public void Initialize()
 {
     Browser = Pegasus.LoginCom("selcorp");
     _integrated = new LocatorReader("IntegratedResidual.xml");
 }
예제 #14
0
 public void TestInitialize()
 {
     s = new LocatorReader("SalesAgent1.xml");
     // Browser = Pegasus.LoginCom("brianagent");
     Browser = Pegasus.LoginMyPeg("brianagent");
     Thread.Sleep(500);
 }
예제 #15
0
 public void TestInitialize()
 {
     doc = new LocatorReader("DocumentManager.xml");
     Browser = Pegasus.LoginCom("seloffice");
     Thread.Sleep(500);
 }
예제 #16
0
 public ReadOnlyCollection<IWebElement> FindElements(LocatorReader r, string node)
 {
     return FindElements(r.Get(node));
 }
예제 #17
0
 public Browser MouseOver(LocatorReader r, params string[] nodes)
 {
     return MouseOver(nodes.ToList().Select(e => r.Get(e)).ToArray());
 }
예제 #18
0
 public Browser DropdownSelectByIndex(LocatorReader r, string node, int index)
 {
     return DropdownSelectByIndex(r.Get(node), index);
 }
예제 #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();
        }
예제 #20
0
 public Browser DropdownSelectByText(LocatorReader r, string node, string text)
 {
     return DropdownSelectByText(r.Get(node), text);
 }
예제 #21
0
 public void TestInitialize()
 {
     d = new LocatorReader("DigitalSignatures.xml");
     Browser = Pegasus.LoginCom("seloffice");
     Thread.Sleep(500);
 }
예제 #22
0
 public Browser DropdownSelectByValue(LocatorReader r, string node, string value)
 {
     return DropdownSelectByValue(r.Get(node), value);
 }
예제 #23
0
 public void TestInitialize()
 {
     _m = new LocatorReader("MerchantPortal.xml");
 }
예제 #24
0
 public int ElementCount(LocatorReader r, string node)
 {
     return ElementCount(r.Get(node));
 }
예제 #25
0
 public bool ElementsVisible(LocatorReader r, params string[] nodes)
 {
     return ElementsVisible(nodes.ToList().Select(e => r.Get(e)).ToArray());
 }
예제 #26
0
 public Browser FillFormReplace(LocatorReader r, string node, string value)
 {
     return FillFormReplace(r.Get(node), value);
 }
예제 #27
0
 public void LoadCommon()
 {
     Common = new LocatorReader("Common.xml");
 }
예제 #28
0
 public IWebElement FindElement(LocatorReader r, string node)
 {
     return FindElement(r.Get(node));
 }
예제 #29
0
 public void TestInitalize()
 {
     _c = new LocatorReader("CorporatePortal2.xml");
     Browser = Pegasus.LoginCom("selcorp");
 }
예제 #30
0
 public void Initialize()
 {
     Browser = Pegasus.LoginCom("tseaa");
     _merger = new LocatorReader("Merger.xml");
 }