当前位置: 首页>>代码示例>>C#>>正文


C# XMLParse.getData方法代码示例

本文整理汇总了C#中PegasusTests.PageHelper.Comm.XMLParse.getData方法的典型用法代码示例。如果您正苦于以下问题:C# XMLParse.getData方法的具体用法?C# XMLParse.getData怎么用?C# XMLParse.getData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PegasusTests.PageHelper.Comm.XMLParse的用法示例。


在下文中一共展示了XMLParse.getData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddAttachment

        public void AddAttachment(string path, string issueID)
        {
            XMLParse _oWaXmlData = new XMLParse();

            _oWaXmlData.LoadXML("../../Config/ApplicationSettings.xml");
            jiraURL = _oWaXmlData.getData("settings/JiraCredentials", "URL");
            jiraUsername = _oWaXmlData.getData("settings/JiraCredentials", "UserName");
            jiraPassword = _oWaXmlData.getData("settings/JiraCredentials", "Password");
            jiraConn = new Jira(jiraURL[0], jiraUsername[0], jiraPassword[0]);

            string jqlString = "project = PegasusCRM AND issuetype = Bug";
            bool result = false;
            IEnumerable<Atlassian.Jira.Issue> jiraIssues = jiraConn.GetIssuesFromJql(jqlString);
            foreach (var issue in jiraIssues)
            {
                if (issue.Key.Value == issueID)
                {
                    Issue foundissue = jiraConn.GetIssue(issueID);
                    foundissue.AddAttachment(path);
                    Console.WriteLine("Attachment Added Successfully");
                    foundissue.SaveChanges();
                    result = true;
                    break;
                }
            }
            if (!result)
            {
                Console.WriteLine("Failed To Add Attachment");
            }
        }
开发者ID:Chandu14488,项目名称:Peg_Admin,代码行数:30,代码来源:DriverHelper.cs

示例2: merchantTabCorp

        public void merchantTabCorp()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username2");
            password = oXMLData.getData("settings/Credentials", "password2");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var clientHelperNewSkin = new ClientHelperNewSkin(GetWebDriver());

            //VARIABLE
            var name = "TestEmployee" + GetRandomNumber();

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click on Agent in Topmenu
            clientHelperNewSkin.ClickElement("ClickOnMerchnatTab");

            //verify
            clientHelperNewSkin.VerifyPageText("Merchants");
            clientHelperNewSkin.WaitForWorkAround(3000);
        }
开发者ID:Chandu14488,项目名称:Peg_New_skin,代码行数:34,代码来源:MerchantTabCorp.cs

示例3: createLeadErrrorMessage

        public void createLeadErrrorMessage()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var leadNewSkinHelper = new LeadNewSkinHelper(GetWebDriver());

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/leads/create");

            //Verify title
            VerifyTitle("Create a Lead");

            //Verify no error message displayed
            loginHelper.VerifyTextNotAvailable("A Lead already exists with the same Company name/Contact Name/Phone Number. Would you like to Merge or Duplicate the Lead?");
        }
开发者ID:Chandu14488,项目名称:Peg_New_skin,代码行数:32,代码来源:CreateLeadErrrorMessage.cs

示例4: tabsNotBroken

        public void tabsNotBroken()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username2");
            password = oXMLData.getData("settings/Credentials", "password2");
            log = oXMLData.getData("settings/URL", "logout");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver());

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Verify tabs not broken
            partnerAgentHelperNewSkin.verifyNotBroken();

            //Logout from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
开发者ID:Chandu14488,项目名称:Peg_New_skin,代码行数:30,代码来源:TabsNotBroken.cs

示例5: pDFImportError

        public void pDFImportError()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username2");
            password = oXMLData.getData("settings/Credentials", "password2");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var pDFTemplateAdminHelper = new PDFTemplateAdminHelper(GetWebDriver());

            //Variable random
            var name = "TESTCLIENT" + RandomNumber(1,999);

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //ClickOnPdfTab
            pDFTemplateAdminHelper.ClickElement("ClickOnPdfTab");

            //Redirect To
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates");
            pDFTemplateAdminHelper.WaitForWorkAround(2000);

            //Redirect To Import
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates/import");

            //ChooseModule
            pDFTemplateAdminHelper.Select("ChooseModule", "20");

            var path = GetPathToFile() + "2.pdf";

            //bROWSER
            pDFTemplateAdminHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", path);

            //Click import
            pDFTemplateAdminHelper.ClickElement("ClickOnImport");
            pDFTemplateAdminHelper.WaitForWorkAround(10000);

            //Select tab
            pDFTemplateAdminHelper.SelectByText("Tab", "Business Details");
            pDFTemplateAdminHelper.WaitForWorkAround(5000);

            //Verify fields availble under section
            pDFTemplateAdminHelper.SelectByText("Section", "Merchant Account Data");
            pDFTemplateAdminHelper.WaitForWorkAround(5000);

            //Verify fields under fields
            pDFTemplateAdminHelper.SelectByText("Fields", "Merchant Type");
        }
开发者ID:Chandu14488,项目名称:Peg_New_skin,代码行数:60,代码来源:PDFImportError.cs

示例6: createPDFPackage

        public void createPDFPackage()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var pDFTemplateAdminHelper = new PDFTemplateAdminHelper(GetWebDriver());

            //Variable random
            var name = "TESTCLIENT" + RandomNumber(1,999);

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Redirect To Admin
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/admin");
            pDFTemplateAdminHelper.WaitForWorkAround(4000);

            //ClickOnPdfTab
            pDFTemplateAdminHelper.ClickElement("ClickOnPdfTab");

            //Redirect To
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/pdf_templates");
            pDFTemplateAdminHelper.WaitForWorkAround(2000);

            //cLICK ON pdf
            pDFTemplateAdminHelper.ClickElement("ClickCreatePackage");
            pDFTemplateAdminHelper.WaitForWorkAround(2000);

            //Enter pakage name
            pDFTemplateAdminHelper.TypeText("PackageName","Test Pakage");

            //Select Module
            pDFTemplateAdminHelper.Select("SelectModule", "20");
            pDFTemplateAdminHelper.WaitForWorkAround(3000);

            //Select
            pDFTemplateAdminHelper.Select("SelectPDFTemplate", "8760");
            pDFTemplateAdminHelper.WaitForWorkAround(3000);

            //SelectCategoryPackage
            pDFTemplateAdminHelper.Select("SelectCategoryPackage", "336");

            //Save PDF Package
            pDFTemplateAdminHelper.ClickElement("SavePDFPakage");
            pDFTemplateAdminHelper.WaitForWorkAround(3000);
        }
开发者ID:Chandu14488,项目名称:Peg_New_skin,代码行数:60,代码来源:CreatePDFPackage.cs

示例7: profilePicUplaodField

        public void profilePicUplaodField()
        {
            string[] username = null;
             string[] password = null;

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

              username = oXMLData.getData("settings/Credentials", "username");
               password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Go to Edit profile page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/editProfile");

            //Verify title
            VerifyTitle("Edit Profile");

            //Verify upload file field availabe
            Assert.IsTrue(loginHelper.IsElementVisible("//*[@id='EmployeeProfileImage']"));
        }
开发者ID:Chandu14488,项目名称:Peg_New_skin,代码行数:31,代码来源:ProfilePicUplaodField.cs

示例8: createUserError1

        public void createUserError1()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");
            log = oXMLData.getData("settings/URL", "logout");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver());

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");

            //Go to Create user page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/users/create");

            //Verify title
            VerifyTitle("Create User");

            //Select User type
            partnerAgentHelperNewSkin.SelectByText("Usertype", "Employee");

            //Click on Create new
            partnerAgentHelperNewSkin.ClickElement("UserCreate");

            //Enter first name
            partnerAgentHelperNewSkin.TypeText("UserFirstName", "Aslam");

            //Enter last Name
            partnerAgentHelperNewSkin.TypeText("UserLastName", "Khan");

            //Enter existing user name
            partnerAgentHelperNewSkin.TypeText("Userusername", username[0]);

            //Enter primary email
            partnerAgentHelperNewSkin.TypeText("UserEmail", "[email protected]");

            //Click on 'Save' button
            partnerAgentHelperNewSkin.ClickElement("UserSave");

            //Wait for text
            partnerAgentHelperNewSkin.WaitForText("This username already taken", 50);

            //Verify error not displayed
            partnerAgentHelperNewSkin.VerifyTextNotPresent("Internal server error page");

            //Logout from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
开发者ID:Chandu14488,项目名称:Peg_New_skin,代码行数:60,代码来源:CreateUserError1.cs

示例9: sendEmailAdmin

        //[TestMethod]
        public void sendEmailAdmin()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            SendEmailAdminHelper sendEmailAdminHelper = new SendEmailAdminHelper(GetWebDriver());

            // Variable
            String name = "Testing Subject" + RandomNumber(1,99);
            String email = "Test" + RandomNumber(1,999)+ "@gmail.com.com";

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click On  Admin
            sendEmailAdminHelper.RedirectToAdmin();

            //################################# SEND E-MAIL #############################################

            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/mails");

            VerifyTitle("Mails");

            // Click On send Email
            sendEmailAdminHelper.ClickElement("ClickOnSendEmail");

            //Verify title
            VerifyTitle("Compose");

            //Enter to
            sendEmailAdminHelper.TypeText("To", "[email protected]");
            //Enter Name
            sendEmailAdminHelper.TypeText("EnterSubjuct", name);

            //Click on importance
            sendEmailAdminHelper.ClickElement("importance");

            //Select Department
            sendEmailAdminHelper.TypeText("EnterMsgtxt", "This is testing description notes");

            //cLICK on Save
            sendEmailAdminHelper.ClickElement("ClickOnSend");

            //Wait for text
            sendEmailAdminHelper.WaitForText("E-Mail Sent Successfully.", 30);
        }
开发者ID:Chandu14488,项目名称:Peg_Admin,代码行数:61,代码来源:SendEmailAdmin.cs

示例10: verifyMyAccount

        public void verifyMyAccount()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");
            log = oXMLData.getData("settings/URL", "logout");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver());

            //Verify title
            VerifyTitle("Login");

            //Click on Verify my account
            partnerAgentHelperNewSkin.ClickElement("VerifyAccount");

            //Enter username
            partnerAgentHelperNewSkin.TypeText("VerifyUsername", "aslamKhan");

            //Click on V
            partnerAgentHelperNewSkin.ClickElement("VerifyBody");

            //Verify error not displayed
            partnerAgentHelperNewSkin.VerifyTextNotPresent("Please include an '@' in the email address");
        }
开发者ID:Chandu14488,项目名称:Peg_New_skin,代码行数:31,代码来源:VerifyMyAccount.cs

示例11: createAndDeletePDFCategories

        public void createAndDeletePDFCategories()
        {
            string[] username = null;
               string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username2");
            password = oXMLData.getData("settings/Credentials", "password2");

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            LoginAsCorpHelper loginAsCorpHelper = new LoginAsCorpHelper(GetWebDriver());
            CreatePDFCategoriesHelper createPDFCategoriesHelper = new CreatePDFCategoriesHelper(GetWebDriver());

            //Variable random

            String  name = "Test" + RandomNumber(1, 99);

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Redirect To
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates/categories");
            createPDFCategoriesHelper.WaitForWorkAround(6000);

            //Click on Click create button
            createPDFCategoriesHelper.ClickElement("ClickOnCreateBtn");
            createPDFCategoriesHelper.WaitForWorkAround(6000);

            //Enter Name
            createPDFCategoriesHelper.TypeText("EnterName", name);

            //Click on Save Button
            createPDFCategoriesHelper.ClickElement("ClickOnSaveBtn");
            createPDFCategoriesHelper.WaitForWorkAround(6000);

            //Verify text present
            createPDFCategoriesHelper.VerifyPageText("Category Created Successfully");

            //Clcik on Delete
            createPDFCategoriesHelper.SearchAndClick(name);
            createPDFCategoriesHelper.AcceptAlert();
            createPDFCategoriesHelper.ClickDisplayed("//a[@title='Save']");
            createPDFCategoriesHelper.WaitForWorkAround(4000);
             //   GetWebDriver().Navigate().Refresh();

               createPDFCategoriesHelper.VerifyPageText("Category Replaced Successfully.");
        }
开发者ID:Chandu14488,项目名称:Peg_bug,代码行数:60,代码来源:CreateAndDeletePDFCategories.cs

示例12: checkDownLoadedFileFormat

        // [TestMethod]
        public void checkDownLoadedFileFormat()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            AddDocumentAdminHelper addDocumentAdminHelper = new AddDocumentAdminHelper(GetWebDriver());

            // Variable
            var Proname = "Product" + RandomNumber(100, 999);

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click On  Admin
            addDocumentAdminHelper.RedirectToAdmin();

               //Redirect to client page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients");

            //Verify Title
            VerifyTitle("Clients");

            //Export as CSV
            addDocumentAdminHelper.ExportAs("CSV");

            var user = addDocumentAdminHelper.CurrentUser();

            //Get newly created file name from downloads folder
            var newfilename = addDocumentAdminHelper.Getnewfilename(new DirectoryInfo(@"C:\" + user + @"s\" + user + @"\Downloads\"));

            var filepath = @"C:\" + user + @"s\" + user + @"\Downloads\" + newfilename.ToString();

            //Verify downloaded file extention
            addDocumentAdminHelper.verifyDownloadedExtention("csv", filepath);

            //Export as Excel
            addDocumentAdminHelper.ExportAs("Excel");

            //Get newly created file name from downloads folder
            newfilename = addDocumentAdminHelper.Getnewfilename(new DirectoryInfo(@"C:\" + user + @"s\" + user + @"\Downloads\"));

            filepath = @"C:\" + user + @"s\" + user + @"\Downloads\" + newfilename.ToString();

            //Verify downloaded file extention
            addDocumentAdminHelper.verifyDownloadedExtention("xls", filepath);
        }
开发者ID:Chandu14488,项目名称:Peg_Admin,代码行数:60,代码来源:CheckDownLoadedCSVFileFormat.cs

示例13: createGroups

        public void createGroups()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var createOfficeGrpAdminHelper = new CreateOfficeGrpAdminHelper(GetWebDriver());

            // Variable
            var name = "Test" + RandomNumber(1, 99);
            var email = "Test" + RandomNumber(1, 999) + "@gmail.com.com";

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click On  Admin
            createOfficeGrpAdminHelper.RedirectToAdmin();

            //##################  Redirect To Url

            //Redirect To URL
            createOfficeGrpAdminHelper.RedirectToPage();

            //Verify title
            VerifyTitle("Groups");

            //################################# Create Master Category #############################################

            // Click On Create
            createOfficeGrpAdminHelper.ClickElement("ClickOnCreate");

            //Verify title
            VerifyTitle("Create a Group");

            //Enter Group Name
            createOfficeGrpAdminHelper.TypeText("GrpName", name);

            //Enter Description
            createOfficeGrpAdminHelper.TypeText("Description", "THIS IS TEST DESCRIPTION");

            //cLICK on Save
            createOfficeGrpAdminHelper.ClickElement("ClickOnSave");

            //Wait for text
            createOfficeGrpAdminHelper.WaitForText("Group has been saved.", 30);
        }
开发者ID:Chandu14488,项目名称:Peg_Admin,代码行数:59,代码来源:CreateGroups.cs

示例14: pDFTemplatesPerminsions

        public void pDFTemplatesPerminsions()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var clientBugsHelper = new ClientBugsHelper(GetWebDriver());

            // Variable
            var name = "Test" + RandomNumber(1,99);

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //#######################  MOVE HOVER TO THE WELCOME
            //Click on Move over
              //  clientBugsHelper.ClickElement("MouserHoverWelcome");

            //Click On  Admin
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/admin");

            //################################# PDF TEMPLATE TAB #############################################

            //Click on Terminal And Equipment Tab
            clientBugsHelper.ClickElement("ClickOnPDFTab");

            //Redirect
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/pdf_templates");

            //Click on PDF
            clientBugsHelper.ClickElement("ClickPDF");

            //Click On Permisions
            clientBugsHelper.ClickElement("ClickOnPermisions");
            clientBugsHelper.WaitForWorkAround(3000);

            //Click On None Of These
            clientBugsHelper.ClickElement("ClickOnNoneOfThese");

            //Click on Updtae
            clientBugsHelper.ClickElement("ClickOnUpdate");
            clientBugsHelper.WaitForWorkAround(2000);

            //Verify Text
            clientBugsHelper.VerifyPageText("Pdf Permissions Updated Successfully.");
        }
开发者ID:Chandu14488,项目名称:Peg_bug,代码行数:59,代码来源:PDFTemplatesPerminsions.cs

示例15: importClientsFromCSV

        public void importClientsFromCSV()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var clientBugsHelper = new ClientBugsHelper(GetWebDriver());

            //Variable

            var FirstName = "Test" + RandomNumber(1, 99);
            var LastName = "Tester" + RandomNumber(1, 99);
            var Number = "12345678" + RandomNumber(10, 99);

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click on Clients in Topmenu
            clientBugsHelper.ClickElement("ClientTab");
            clientBugsHelper.WaitForElementPresent("ClickOnImport", 20);

            //Click On Import
            clientBugsHelper.ClickElement("ClickOnImport");
            clientBugsHelper.WaitForWorkAround(2000);

            //Upload
            var Path = GetPathToFile() + "clientsamples(2).csv";
            clientBugsHelper.uploadCSVClient("SelectFile", Path);
            clientBugsHelper.WaitForWorkAround(3000);

            //Click On Import
            clientBugsHelper.ClickElement("ClickOnImportClint");
            clientBugsHelper.WaitForWorkAround(3000);

            //Select Client Import
            //  clientBugsHelper.Select("SelectClientImport","47");
            clientBugsHelper.WaitForWorkAround(3000);

            //Residual Import Sel
            //clientBugsHelper.Select("ResidualImportSel", "");

            //ClickImprtProcess
            clientBugsHelper.ClickElement("ClickImprtProcess");
            clientBugsHelper.WaitForWorkAround(10000);
        }
开发者ID:Chandu14488,项目名称:Peg_bug,代码行数:58,代码来源:ImportClientsFromCSV.cs


注:本文中的PegasusTests.PageHelper.Comm.XMLParse.getData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。