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


C# ISelenium.Select方法代码示例

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


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

示例1: UpdateEventStartDateTime

 /*
 /// <Summary>
 /// Update Horse Racing event start date
 /// Author: Revathy
 /// Created Date: Apr-30-2013
 /// </Summary>
 public string UpdateEventStartDateTime(ISelenium adminBrowserObj, string eventid, string date)
 {
     string EventStartTime = GetEventStartTimeByEventID(adminBrowserObj, eventid);
     SelectMainFrame(adminBrowserObj);
     adminBrowserObj.Type("//input[@name='EvStartTime']", date);
     adminBrowserObj.Click(AdminSuite.CommonControls.EventDetailsPage.updateEventBtn);
     return EventStartTime;
 }
  */
 /// <Summary>
 /// Update Horse Racing event Early price status 
 /// Author: Revathy 
 /// Created Date: Apr-30-2013
 /// </Summary>
 public void SetEventLPStatus(ISelenium adminBrowserObj, string eventid, string status)
 {
     string EventStartTime = GetEventStartTimeByEventID(adminBrowserObj, eventid);
     adminBrowserObj.Click("//a[contains(string(),'Race Winner')]");
     Thread.Sleep(5000);
     SelectMainFrame(adminBrowserObj);
     adminBrowserObj.Select("//select[@name='MktLPAvail']", status);
     adminBrowserObj.Click("//input[@value='Modify Market']");
 }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:29,代码来源:Common.cs

示例2: VerifySelectionData

        /// <summary>
        /// Verifying selection data
        /// </summary>
        /// <param name="browser">Browser instance</param>
        /// <param name="testData">TestData</param>
        public void VerifySelectionData(ISelenium browser, TestData testData)
        {
            string selectionStatus = string.Empty;
            string selectionDisplay = string.Empty;
            string selectionPrice = string.Empty;
            bool updateSelectionFlg = false;

            if (_frameworkCommon.WaitUntilElementPresent(browser, "name=OcDesc", "60") == true)
            {
                selectionStatus = browser.GetValue(AdminSuite.CommonControls.EventDetailsPage.SelectionStatusLstBx);

                selectionDisplay = browser.GetValue(AdminSuite.CommonControls.EventDetailsPage.SelectionDispStatusListBx);

                selectionPrice = browser.GetValue(AdminSuite.CommonControls.EventDetailsPage.PriceTxtBx);

                if ("a" != selectionStatus.ToLower())
                {
                    browser.Select(AdminSuite.CommonControls.EventDetailsPage.SelectionStatusLstBx, "label=Active");
                    Console.WriteLine("Updated selection status to Active");
                    updateSelectionFlg = true;
                }

                if ("y" != selectionDisplay.ToLower())
                {
                    browser.Select(AdminSuite.CommonControls.EventDetailsPage.SelectionDispStatusListBx, "label=Yes");
                    Console.WriteLine("Updated selection display to Yes");
                    updateSelectionFlg = true;
                }

                if (testData.Odds != selectionPrice)
                {
                    browser.Type(AdminSuite.CommonControls.EventDetailsPage.PriceTxtBx, testData.Odds);
                    Console.WriteLine("Updated selection price from test data");
                    updateSelectionFlg = true;
                }

                if (updateSelectionFlg)
                {
                    if (browser.IsElementPresent(AdminSuite.CommonControls.EventDetailsPage.SelectionUpdateBtn))
                    {
                        browser.Click(AdminSuite.CommonControls.EventDetailsPage.SelectionUpdateBtn);
                        browser.WaitForPageToLoad(Framework.FrameGlobals.PageLoadTimeOut);
                    }
                    else
                    {
                        Console.WriteLine("Unable to update the event in Openbet");
                    }

                    Thread.Sleep(3000);
                }
                browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            }
        }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:58,代码来源:Common.cs

示例3: RegisterCustomer_selfExclusion

        ///<summary>
        /// This method creates a customer with the same details of a self exclusion customer
        /// <example>RegisterCustomer_selfExclusion(portalbrowser, adminbrowser) </example>
        public void RegisterCustomer_selfExclusion(ISelenium browser, ISelenium adminBrowser)
        {
            try
            {
                string regMsg, gender, xPath;
                var admincommonObj = new AdminSuite.Common();
                Random rnd = new Random();
                int rndNumber = rnd.Next(10000);

                //get details of customer in OB
                adminBrowser.WindowFocus();
                string username = "AutoUser" + rndNumber;
                admincommonObj.SelectMainFrame(adminBrowser);
                string firstname = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), 'First Name:')]/following-sibling::td");
                string lastname = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), 'Last Name:')]/following-sibling::td");
                string title = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), 'Title:')]/following-sibling::td");
                if (title.ToLower() == "mr")
                {
                    gender = "male";
                }
                else
                {
                    gender = "female";
                }

                string dob = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), 'Date of Birth:')]/following-sibling::td");
                string[] arr = dob.Split('-');
                string DOByear = arr[0];
                System.Globalization.DateTimeFormatInfo mfi = new System.Globalization.DateTimeFormatInfo();
                string DOBmonth = mfi.GetMonthName(int.Parse(arr[1])).ToString();
                string DOBday = arr[2];

                string houseno = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), 'Address (1)')]/following-sibling::td");
                string postcode = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), 'Postcode:')]/following-sibling::td");

                string address1 = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), '(2)')]/following-sibling::td") + adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), '(3)')]/following-sibling::td");
                string address2 = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), '(3)')]/following-sibling::td");
                string city = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), 'City:')]/following-sibling::td");
                string email = adminBrowser.GetText("//tr/td[@class='caption' and contains(text(), 'Email:')]/following-sibling::td");
                string teleCode = "+44";
                string telnumber = "1234567890";
                string mobnumber = "1234512345";

                string password = "12345678";
                string confirmPassword = "12345678";
                string securityQuestion = "Favourite Colour";
                string securityAnswer = "Blue";

                string accountCurrency = "UK Pound Sterling";
                string country = "United Kingdom";

                browser.WindowFocus();
                WaitForLoadingIcon_MobileLobby(browser, FrameGlobals.IconLoadTimeout);
                Assert.IsTrue(browser.IsVisible(MobileLobbyControls.registrationTitle), "Registration Page is not displayed");

                //Enter data in all the fields
                browser.Type(MobileLobbyControls.promocode, "");
                browser.Select(MobileLobbyControls.title, title);
                browser.Type(MobileLobbyControls.firstname, firstname);
                browser.Type(MobileLobbyControls.lastname, lastname);
                //gender
                if (gender.ToLower().Trim() == "male")
                {
                    browser.Click(MobileLobbyControls.genderMale);
                }
                else
                {
                    browser.Click(MobileLobbyControls.genderFemale);
                }

                browser.Select(MobileLobbyControls.DOBday, DOBday);
                browser.Select(MobileLobbyControls.DOBmonth, DOBmonth);
                browser.Select(MobileLobbyControls.DOByear, DOByear);
                browser.Select(MobileLobbyControls.country, country);

                browser.Type(MobileLobbyControls.housename, houseno);
                browser.Type(MobileLobbyControls.postcode, postcode);
                browser.Type(MobileLobbyControls.address1, address1);
                browser.Type(MobileLobbyControls.address2, address2);
                browser.Type(MobileLobbyControls.city, city);
                browser.Type(MobileLobbyControls.email, email);

                browser.Type(MobileLobbyControls.telintcode, teleCode);
                browser.Type(MobileLobbyControls.telnumber, telnumber);
                browser.Type(MobileLobbyControls.mobintcode, teleCode);
                browser.Type(MobileLobbyControls.mobnumber, mobnumber);
                browser.Select(MobileLobbyControls.accountCurrency, accountCurrency);

                browser.Type(MobileLobbyControls.username, username);
                browser.Type(MobileLobbyControls.password, password);
                browser.Type(MobileLobbyControls.confirmPassword, confirmPassword);
                browser.Select(MobileLobbyControls.securityQuestion, securityQuestion);
                browser.Type(MobileLobbyControls.securityAnswer, securityAnswer);
                MLcommonObj.SelectCheckbox(browser, MobileLobbyControls.contactMe, "on");
                MLcommonObj.SelectCheckbox(browser, MobileLobbyControls.aggreement, "on");
                Thread.Sleep(1000);

//.........这里部分代码省略.........
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:101,代码来源:MobileLobbyFunctions.cs

示例4: UpdateSelectionDisplayStatus

 /// <summary>
 /// To update the Selection 
 /// </summary>
 /// <param name="browser">Selenium browser Instance</param>
 /// <param name="selectionId">ID of the selection</param>
 /// <param name="status"> Display Status to be updated</param>
 public void UpdateSelectionDisplayStatus(ISelenium browser, string selectionId, string displayStatus)
 {
     //Clicking on Event Link in LHN
     LHNavigation(AdminSuite.CommonControls.AdminHomePage.EventNameLink, browser);
     //Selecting TopFrame
     SelectMainFrame(browser);
     browser.Type(AdminSuite.CommonControls.AdminHomePage.OpenBetIdTextBox, selectionId);
     browser.Select(AdminSuite.CommonControls.AdminHomePage.OpenBetHierarchyLevelDrpLst, AdminSuite.CommonControls.AdminHomePage.OpenBetHeierarchyName);
     browser.Click(AdminSuite.CommonControls.AdminHomePage.EventFindBtn);
     browser.WaitForPageToLoad(Framework.FrameGlobals.PageLoadTimeOut);
     if (String.IsNullOrWhiteSpace(displayStatus) == false)
     {
         browser.Select(AdminSuite.CommonControls.EventDetailsPage.SelectionDispStatusListBx, "label=" + displayStatus + "");
     }
     else
     {
         Fail("unable to update the Displayed status in admin as Displayed list box is not present in admin");
     }
     // Updating the event details page
     browser.Click(AdminSuite.CommonControls.EventDetailsPage.SelectionUpdateBtn);
     browser.WaitForPageToLoad(Framework.FrameGlobals.PageLoadTimeOut);
 }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:28,代码来源:Common.cs

示例5: VerifyEventData

        /// <summary>
        /// Verifying event details data in openbet
        /// </summary>
        /// <param name="browser">Browser instance</param>
        /// <param name="testData">Test data</param>
        public void VerifyEventData(ISelenium browser, TestData testData)
        {
            //IWebDriver driver = ((WebDriverBackedSelenium)browser).UnderlyingWebDriver;

            string eventStatus = string.Empty;
            string eventDisplay = string.Empty;
            bool updateEventFlg = false;
            //Wait Untill the EventDetails Page loads
            if (_frameworkCommon.WaitUntilElementPresent(browser, AdminSuite.CommonControls.EventDetailsPage.eventDescriptionTextBox, "60") == true)
            {

                eventStatus = browser.GetValue(AdminSuite.CommonControls.EventDetailsPage.eventStatusListBox);

                eventDisplay = browser.GetValue(AdminSuite.CommonControls.EventDetailsPage.eventDisplayStatusLstBx);

                if ("a" != eventStatus.ToLower())
                {
                    browser.Select(AdminSuite.CommonControls.EventDetailsPage.eventStatusListBox, "label=Active");
                    Console.WriteLine("Updated Event status to Active");
                    updateEventFlg = true;
                }

                if ("y" != eventDisplay.ToLower())
                {
                    browser.Select(AdminSuite.CommonControls.EventDetailsPage.eventDisplayStatusLstBx, "label=Yes");
                    Console.WriteLine("Updated Event display to Yes");
                    updateEventFlg = true;
                }

                if (updateEventFlg)
                {
                    if (browser.IsElementPresent(AdminSuite.CommonControls.EventDetailsPage.updateEventBtn))
                    {
                        browser.Click(AdminSuite.CommonControls.EventDetailsPage.updateEventBtn);
                        browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                        Assert.IsTrue(_frameworkCommon.WaitUntilElementPresent(browser, AdminSuite.CommonControls.EventDetailsPage.eventDescriptionTextBox, "120"), "Event Updation is not Successfull");
                    }
                    else
                    {
                        Console.WriteLine("Unable to update the event in Openbet");
                    }
                }
                browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            }
        }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:50,代码来源:Common.cs

示例6: UpdatePayMtd

        /// <summary>
        /// Adding a Reward Adhoc token to customer in Admin.
        /// </summary>
        /// Date Created:
        /// Author: Anand C
        /// User should be login to Admin application
        /// <param name="adminBrowser">Browser Instance</param>
        /// <param name="custName">Customer name for whom the token be added</param>
        /// <param name="tokenVal">token value to be added</param>
        public bool UpdatePayMtd(ISelenium adminBrowser, string cardNum, string status, string CustomerName)
        {
            try
            {
                //Click on Debit/Credit link
                /*if (!AdminTableObjects(adminBrowser, "Customer Payment Methods", cardNum.Substring(cardNum.Length - 4, 4), "Link", "", 1))
                {
                    Framework.BaseTest.CaptureScreenshot(adminBrowser);
                    Console.WriteLine("Unable to put value in Card Search Text box in Card Search page");
                    return false;
                }*/
                Assert.IsTrue(adminBrowser.IsElementPresent("//table//th[contains(text(),'Customer Payment Methods')]//ancestor::table/tbody/tr[td[contains(.,'" + cardNum.Substring(cardNum.Length - 4, 4) + "')]]//a"), cardNum + " card is not available for this customer: " + CustomerName);
                adminBrowser.Click("//table//th[contains(text(),'Customer Payment Methods')]//ancestor::table/tbody/tr[td[contains(.,'" + cardNum.Substring(cardNum.Length - 4, 4) + "')]]//a");
                adminBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);

                //
                Assert.IsTrue(adminBrowser.IsElementPresent("//select[@name='status']"), "Authorisation status list box is not visible");
                Assert.IsTrue(adminBrowser.IsElementPresent("//select[@name='auth_dep']"), "Authorisation deposit list box is not visible");
                Assert.IsTrue(adminBrowser.IsElementPresent("//select[@name='auth_wtd']"), "Authorisation withdrawal list box is not visible");
                adminBrowser.Select("//select[@name='status']", status);
                adminBrowser.Select("//select[@name='auth_dep']", "Yes");
                adminBrowser.Select("//select[@name='status_dep']", "Active");
                adminBrowser.Select("//select[@name='auth_wtd']", "Yes");
                adminBrowser.Select("//select[@name='status_wtd']", "Active");

                //click on the Update Payment Method button
                if (!AdminTableObjects(adminBrowser, "Authorisation", "", "Button", "Update Payment Method", 1))
                {
                    Framework.BaseTest.CaptureScreenshot(adminBrowser, "");
                    Console.WriteLine("Unable click on  Payment Method button in Customer Payment page");
                    return false;
                }
                adminBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                Thread.Sleep(5000);
                Console.WriteLine("Successfully searched the customer");
                return true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Framework.BaseTest.CaptureScreenshot(adminBrowser, "");
                return false;
            }
        }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:53,代码来源:Common.cs

示例7: UpdateSegments

        /// <summary>
        /// Updates a perticular segment value
        /// </summary>
        ///  Author: Kiran
        /// <param name="browser">browser Instance</param>
        /// <param name="userName">User Name</param>
        /// <param name="segmentType">HVC</param>
        /// <param name="segmentVal">Yes</param>
        public bool UpdateSegments(ISelenium adminBrowser, string userName, string segmentType, string segmentVal)
        {
            try
            {
                // Enter Customer Name and Search
                SearchCustomer(userName, adminBrowser);
                SelectMainFrame(adminBrowser);
                adminBrowser.Click(AdminSuite.CustomerCreation.CustomersPage.updateSegment);
                adminBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);

                string xPath = "//tr/td[contains(text(), '" + segmentType + "')]/following-sibling::td/select";
                Assert.IsTrue(adminBrowser.IsElementPresent(xPath), "Element not found " + xPath);
                adminBrowser.Select(xPath, segmentVal);
                Thread.Sleep(1000);
                adminBrowser.Click(AdminSuite.CustomerCreation.CustomersPage.updateSegmentandURL);
                adminBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                xPath = "//tr/td[@class='caption' and contains(text(), '" + segmentType + "')]/following-sibling::td[contains(text(), '" + segmentVal + "')]";
                if (segmentVal.ToLower().Contains("unset") || segmentVal.ToLower().Contains("no"))
                {
                    if (adminBrowser.IsAlertPresent())
                    {
                        adminBrowser.ChooseOkOnNextConfirmation();
                    }
                    xPath = "//tr/td[@class='caption' and contains(text(), '" + segmentType + "')]/following-sibling::td/i[contains(text(), '" + segmentVal + "')]";
                }
                adminBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                adminBrowser.Click(AdminSuite.CustomerCreation.CustomersPage.backBtn);
                adminBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                Assert.IsTrue(adminBrowser.IsElementPresent(xPath), "Element not found " + xPath);
                return true;
            }
            catch (Exception ex)
            {
                CaptureScreenshot(adminBrowser, "");
                Fail(ex.Message);
                return false;
            }
        }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:46,代码来源:Common.cs

示例8: UpdateEachWay

        /// <summary>
        /// Update each way in Open bet.
        /// </summary>
        /// <param name="browser">Browser instance</param>
        /// <param name="selectionId">Selection id</param>
        /// <param name="eachWayPlaces">Each way place</param>
        /// <param name="eachWayTopValue">Top value</param>
        /// <param name="eachWayBottomValue">bottom value</param>
        /// <returns></returns>
        public string UpdateEachWay(ISelenium browser, string selectionId, string eachWayPlaces, string eachWayTopValue, string eachWayBottomValue)
        {
            try
            {
                string updatedMarektIndex = "";
                //Clicking on Event Link in LHN
                LHNavigation(AdminSuite.CommonControls.AdminHomePage.EventNameLink, browser);
                //Selecting TopFrame
                SelectMainFrame(browser);
                browser.WaitForFrameToLoad(AdminSuite.CommonControls.AdminHomePage.EventNameLink, FrameGlobals.PageLoadTimeOut);
                browser.Type(AdminSuite.CommonControls.AdminHomePage.OpenBetIdTextBox, selectionId);
                browser.Select(AdminSuite.CommonControls.AdminHomePage.OpenBetHierarchyLevelDrpLst, AdminSuite.CommonControls.AdminHomePage.OpenBetHeierarchyName);
                browser.Click(AdminSuite.CommonControls.AdminHomePage.EventFindBtn);
                _frameworkCommon.WaitUntilAllElementsLoad(browser);
                browser.WaitForPageToLoad(Framework.FrameGlobals.PageLoadTimeOut);
                browser.Click(AdminSuite.CommonControls.EventDetailsPage.BackButton);//click on back button present in the selection page
                browser.WaitForPageToLoad(Framework.FrameGlobals.PageLoadTimeOut);

                if (string.Empty != eachWayPlaces && "0" != eachWayPlaces.Trim())
                {
                    browser.Type(AdminSuite.CommonControls.EventDetailsPage.EachWayPlacesTxtBx, eachWayPlaces);
                    Console.WriteLine("Each way Places is  updated to : " + eachWayPlaces + "");
                }

                if (string.Empty != eachWayTopValue && "0" != eachWayTopValue.Trim())
                {
                    browser.Type(AdminSuite.CommonControls.EventDetailsPage.EachWayTopTxtBx, eachWayTopValue);
                    Console.WriteLine("Each way top is  updated to : " + eachWayTopValue + "");
                }

                if (string.Empty != eachWayBottomValue && "0" != eachWayBottomValue.Trim())
                {
                    browser.Type(AdminSuite.CommonControls.EventDetailsPage.EachWayBottomTxtBx, eachWayBottomValue);
                    Console.WriteLine("Each way Bottom is  updated to : " + eachWayBottomValue + "");
                }

                // Updating the event details page
                browser.Click(AdminSuite.CommonControls.EventDetailsPage.ModifyMarketButton);
                browser.WaitForPageToLoad(Framework.FrameGlobals.PageLoadTimeOut);
                return updatedMarektIndex;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                Console.WriteLine(ex.Message);
                return null;
            }
        }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:57,代码来源:Common.cs

示例9: UpdateEachWayByEventID

        public void UpdateEachWayByEventID(ISelenium browser, string eventId, string status)
        {
            try
            {
                //Clicking on Event Link in LHN
                LHNavigation(AdminSuite.CommonControls.AdminHomePage.EventNameLink, browser);
                //Selecting TopFrame
                SelectMainFrame(browser);
                browser.WaitForFrameToLoad(AdminSuite.CommonControls.AdminHomePage.EventNameLink, FrameGlobals.PageLoadTimeOut);
                browser.Type(AdminSuite.CommonControls.AdminHomePage.OpenBetIdTextBox, eventId);
                browser.Select(AdminSuite.CommonControls.AdminHomePage.OpenBetHierarchyLevelDrpLst, AdminSuite.CommonControls.AdminHomePage.OpenBetHeierarchyLevelEvent);
                browser.Click(AdminSuite.CommonControls.AdminHomePage.EventFindBtn);
                _frameworkCommon.WaitUntilAllElementsLoad(browser);
                browser.WaitForPageToLoad(Framework.FrameGlobals.PageLoadTimeOut);

                //browser.Click("label=|Race Winner|");

                if (browser.IsElementPresent(string.Format("link=|{0}|", "Race Winner")))
                {
                    browser.Click(string.Format("link=|{0}|", "Race Winner"));
                    _frameworkCommon.WaitUntilAllElementsLoad(browser);
                    browser.WaitForPageToLoad(Framework.FrameGlobals.PageLoadTimeOut);

                    browser.Select("name=MktEWAvail", "label=" + status);

                    if (status == "Yes")
                    {
                        browser.Type(AdminSuite.CommonControls.EventDetailsPage.EachWayPlacesTxtBx, "1");
                        browser.Type(AdminSuite.CommonControls.EventDetailsPage.EachWayTopTxtBx, "1");
                        browser.Type(AdminSuite.CommonControls.EventDetailsPage.EachWayBottomTxtBx, "1");
                    }

                    browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);

                    //update Market
                    if (browser.IsElementPresent(AdminSuite.CommonControls.EventDetailsPage.ModifyMarketButton))
                    {
                        browser.Click(AdminSuite.CommonControls.EventDetailsPage.ModifyMarketButton);
                        browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                        Assert.IsTrue(_frameworkCommon.WaitUntilElementPresent(browser, AdminSuite.CommonControls.EventDetailsPage.eventDescriptionTextBox, "120"), "Market Updation is not Successfull");
                    }

                }
                else
                {
                    Console.WriteLine("Market is not available");
                }
                Thread.Sleep(3000);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                Console.WriteLine(ex.Message);
            }
        }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:55,代码来源:Common.cs

示例10: UpdateCustomerFlag

 /// <summary>
 /// To Update Customer Flag Information
 /// </summary>
 ///  Author: Anand
 /// <param name="flagName"> </param>
 /// <param name="flagVal"> </param>
 /// <param name="myBrowser"> </param>
 /// Ex: Adit_Test_SelfExcluded
 /// <returns>None</returns>
 /// Created Date: 12-April-2012
 public bool UpdateCustomerFlag(string flagName, string flagVal, ISelenium myBrowser)
 {
     try
     {
         // Navigating to MainFrame
         SelectMainFrame(myBrowser);
         IWebDriver driver = ((WebDriverBackedSelenium)myBrowser).UnderlyingWebDriver;
         Assert.IsTrue(myBrowser.IsElementPresent(AdminSuite.CustomerCreation.CustomersPage.ViewCustFlag), "Customer Flag Information table isnot found");
         myBrowser.Click(AdminSuite.CustomerCreation.CustomersPage.ViewCustFlag);
         myBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
         //Updating the customer flags
         Assert.IsTrue(driver.FindElement(By.XPath("//tr//td/b[text()='" + flagName + "']//ancestor::tr/td/Select")).Displayed, "Unable to navigate to Customer Flags page");
         myBrowser.Select("//tr//td/b[text()='" + flagName + "']//ancestor::tr/td/Select", flagVal);
         Assert.IsTrue(driver.FindElement(By.XPath("//th[@class='buttons']/input[@value='Update Customer Flags']")).Displayed, "Update Customer Flags button is not displayed in Customer Flags page");
         myBrowser.Click("//th[@class='buttons']/input[@value='Update Customer Flags']");
         myBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
         return true;
     }
     catch (Exception ex)
     {
         BaseTest.CaptureScreenshot(myBrowser, "");
         Console.WriteLine(ex.StackTrace);
         BaseTest.Fail(ex.Message);
         return false;
     }
 }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:36,代码来源:Common.cs

示例11: UpdateCustomerStatus

        /// <summary>
        ///  Active the status of a customer
        /// </summary>
        ///  Author: Kiran
        /// <param name="browser">Browser Instance</param>
        /// <param name="userName">User Name</param>
        public void UpdateCustomerStatus(ISelenium browser, string userName, string status, string statusGroup, string statusReason)
        {
            //Clicking on Event Link in LHN
            LHNavigation(AdminSuite.CommonControls.AdminHomePage.CustomersLink, browser);
            //Selecting TopFrame
            SelectMainFrame(browser);
            // Enter Customer Name and Search
            SearchCustomer(userName, browser);
            //
            if (browser.IsElementPresent(AdminSuite.CustomerCreation.CustomersPage.UpdateCustomerButton))
            {
                browser.Select(AdminSuite.CustomerCreation.CustomersPage.CustomerStatusLstBx, status);
                browser.Select(AdminSuite.CustomerCreation.CustomersPage.ReasonForSuspendingUserLstBx, statusGroup);
                Thread.Sleep(2000);
                browser.Select(AdminSuite.CustomerCreation.CustomersPage.StatusReasonLstBx, statusReason);

                browser.Click(AdminSuite.CustomerCreation.CustomersPage.UpdateCustomerButton);
                _frameworkCommon.WaitUntilAllElementsLoad(browser);
            }
        }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:26,代码来源:Common.cs

示例12: UpdateBannedCountryCustomer

 /// <summary>
 ///  Add desired Customer to Banned User Group
 /// </summary>
 ///  Author: Anand
 /// <param name="browser">Browser Instance</param>
 /// <param name="userName">User Name</param>
 public bool UpdateBannedCountryCustomer(ISelenium browser, string userName, string countryName)
 {
     //Clicking on Event Link in LHN
     LHNavigation(AdminSuite.CommonControls.AdminHomePage.CustomersLink, browser);
     //Selecting TopFrame
     SelectMainFrame(browser);
     // Enter Customer Name and Search
     SearchCustomer(userName, browser);
     //
     if (browser.IsElementPresent(AdminSuite.CustomerCreation.CustomersPage.UpdateRegistrationButton))
     {
         browser.Click(AdminSuite.CustomerCreation.CustomersPage.UpdateRegistrationButton);
         browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
         //const string strBannedCountryName = ;
         browser.Select(AdminSuite.CustomerCreation.CustomersPage.CntryTxtBx, countryName);
         browser.Click(AdminSuite.CustomerCreation.CustomersPage.UpdateCustomerButton);
         _frameworkCommon.WaitUntilAllElementsLoad(browser);
         if (browser.IsTextPresent(countryName))
         {
             //UpdateCustomerStatus(browser, userName, "Active", "-- unset --", "-- unset --");
             Console.WriteLine("Change of country to " + countryName + " is successfull");
             return true;
         }
         else
         {
             Console.WriteLine("Change of country to " + countryName + " was unsuccessfull");
             return false;
         }
     }
     else
     {
         Console.WriteLine("AdminSuite:Common:Fail- Update Registration Button is not Found");
         return false;
     }
 }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:41,代码来源:Common.cs

示例13: ShowTomoHorseRacingEvents

 /// <Summary>
 /// Show all Horse Racing Events that starts "Tomorrow"
 /// Author: Aswathy 
 /// Created Date: Apr-19-2013
 /// </Summary>
 public void ShowTomoHorseRacingEvents(ISelenium adminBrowser)
 {
     Framework.Common.Common frameworkcommon = new Framework.Common.Common();
     //Clicking on Event Link in LHN
     LHNavigation(AdminSuite.CommonControls.AdminHomePage.EventNameLink, adminBrowser);
     //Selecting TopFrame
     SelectMainFrame(adminBrowser);
     System.Threading.Thread.Sleep(10000);
     adminBrowser.Select(AdminSuite.CommonControls.EventDetailsPage.categoryNameLstBx, "label=RACING");
     adminBrowser.Select(AdminSuite.CommonControls.EventDetailsPage.classNameLstBx, "label=Horse Racing");
     // adminBrowser.Select(AdminSuite.CommonControls.EventDetailsPage.eventTypeLstBx, "label=" + eventTypeName);
     // adminBrowser.Select(AdminSuite.CommonControls.EventDetailsPage.subEventTypeLstBx, "label=" + eventSubType);
     adminBrowser.Select(AdminSuite.CommonControls.EventDetailsPage.dateRangeLstBx, "label=Tomorrow");
     adminBrowser.Select("name=status", "label=Active");
     adminBrowser.Click(AdminSuite.CommonControls.EventDetailsPage.showEventBtn);
     adminBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
 }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:22,代码来源:Common.cs

示例14: SetSelectionResult

 /// <summary>
 /// Update a Selection result
 /// Author: Aswathy 
 /// Created Date: Jun-10-2013
 /// </summary>
 public void SetSelectionResult(ISelenium adminBrowser, string selectionID, string resultStatus)
 {
     try
     {
         //Clicking on Event Link in LHN
         LHNavigation(AdminSuite.CommonControls.AdminHomePage.EventNameLink, adminBrowser);
         //Selecting TopFrame
         SelectMainFrame(adminBrowser);
         adminBrowser.Type(AdminSuite.CommonControls.AdminHomePage.OpenBetIdTextBox, selectionID);
         adminBrowser.Select(AdminSuite.CommonControls.AdminHomePage.OpenBetHierarchyLevelDrpLst, AdminSuite.CommonControls.AdminHomePage.OpenBetHeierarchyName);
         adminBrowser.Click(AdminSuite.CommonControls.AdminHomePage.EventFindBtn);
         adminBrowser.WaitForPageToLoad(Framework.FrameGlobals.PageLoadTimeOut);
         adminBrowser.Select(AdminSuite.CommonControls.AdminHomePage.ResultStatus, "label=" + resultStatus + "");
         adminBrowser.Click("//input[@type='button' and @value='Set Selection Results']");
         adminBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
     }
     catch (Exception ex)
     {
         CaptureScreenshot(adminBrowser, "");
         Console.WriteLine(ex);
     }
 }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:27,代码来源:Common.cs

示例15: UpdateMarketStatus

        /// <summary>
        /// To Update Markt  Status
        /// </summary>
        /// <param name="browser">Selenium browser instance</param>
        /// <param name="catName">Category Name</param>
        /// <param name="eventClsName">Event ClassName</param>
        /// <param name="eventTypeName">Event TypeName</param>
        /// <param name="eventSubType">Event SubType</param>
        /// <param name="eventName">Event Name</param>
        /// <param name="eventStatus">Event Display Status</param>
        public void UpdateMarketStatus(ISelenium browser, string catName, string eventClsName, string eventTypeName, string eventSubType, string eventName, string mktName, string marketStatus)
        {
            string errorMessage = "";
            bool eventUpdationStatus = false;
            bool finalEventStatus = true;
            Framework.Common.Common frameworkcommon = new Framework.Common.Common();
            AdminSuite.Common com = new AdminSuite.Common();
            Framework.Common.Common Fcommon = new Framework.Common.Common();

            TimeSpan ts = new TimeSpan(0, 1, 0);
            IWebDriver driver = ((WebDriverBackedSelenium)browser).UnderlyingWebDriver;

            //Clicking on Event Link in LHN
            LHNavigation(AdminSuite.CommonControls.AdminHomePage.EventNameLink, browser);
            //Selecting TopFrame
            SelectMainFrame(browser);
            System.Threading.Thread.Sleep(10000);

            frameworkcommon.WaitUntilElementPresent(browser, AdminSuite.CommonControls.EventDetailsPage.categoryNameLstBx, "60");
            catName = catName.Replace("|", "").Trim();
            if (catName != "")
            {
                Assert.IsTrue(frameworkcommon.CheckItemPresentInDropDownList(browser, AdminSuite.CommonControls.EventDetailsPage.categoryNameLstBx, catName), "Category Name does not present in DropdownList");
                browser.Select(AdminSuite.CommonControls.EventDetailsPage.categoryNameLstBx, "label=" + catName);
            }
            eventClsName = eventClsName.Replace("|", "").Trim();

            if (eventClsName != "")
            {
                Assert.IsTrue(frameworkcommon.CheckItemPresentInDropDownList(browser, AdminSuite.CommonControls.EventDetailsPage.classNameLstBx, eventClsName), "EventClass Name does not present");
                browser.Select(AdminSuite.CommonControls.EventDetailsPage.classNameLstBx, "label=" + eventClsName);
            }
            if (eventTypeName != "")
            {
                Assert.IsTrue(frameworkcommon.CheckItemPresentInDropDownList(browser, AdminSuite.CommonControls.EventDetailsPage.eventTypeLstBx, eventTypeName), "EventClass Name does not present");
                browser.Select(AdminSuite.CommonControls.EventDetailsPage.eventTypeLstBx, "label=" + eventTypeName);
            }
            Assert.IsTrue(frameworkcommon.CheckItemPresentInDropDownList(browser, AdminSuite.CommonControls.EventDetailsPage.dateRangeLstBx, "--"), "Date range dropdown missing");

            // Selecting Daterange
            browser.Select(AdminSuite.CommonControls.EventDetailsPage.dateRangeLstBx, "label=--");

            //Clicking on Seach button
            browser.Click(AdminSuite.CommonControls.EventDetailsPage.eventSearchBtn);
            _frameworkCommon.WaitUntilAllElementsLoad(browser);
            browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);

            // Wait for Element to present
            if (frameworkcommon.WaitUntilElementPresent(browser, "link=" + eventName + "", "60") == true)
            {
                browser.Click("link=" + eventName);
                browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                Thread.Sleep(10000);
                //Wait Untill the EventDetails Page loads
                if (frameworkcommon.WaitUntilElementPresent(browser, AdminSuite.CommonControls.EventDetailsPage.eventDescriptionTextBox, "60") == true)
                {

                    if (frameworkcommon.WaitUntilElementPresent(browser, "link=" + "|" + mktName + "|" + "", "60") == true)
                    {
                        //browser.Click("link=" + mktName);
                        browser.Click("link=" + "|" + mktName + "|");
                        browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);

                        if (marketStatus == "Suspend")
                        {
                            browser.Select(AdminSuite.CommonControls.EventDetailsPage.marketStatusListBox, "label=Suspended");
                            eventUpdationStatus = false;
                            browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                        }
                        else
                        {
                            browser.Select(AdminSuite.CommonControls.EventDetailsPage.marketStatusListBox, "label=Active");
                        }

                        //Updating the Event
                        if (browser.IsElementPresent(AdminSuite.CommonControls.EventDetailsPage.ModifyMarketButton))
                        {
                            if (eventUpdationStatus == false)
                            {
                                browser.Click(AdminSuite.CommonControls.EventDetailsPage.ModifyMarketButton);
                                browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                                Assert.IsTrue(frameworkcommon.WaitUntilElementPresent(browser, AdminSuite.CommonControls.EventDetailsPage.eventDescriptionTextBox, "120"), "markrt display status Updation is not Successfull");
                                browser.Click(AdminSuite.CommonControls.EventDetailsPage.updateEventBtn);
                                browser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
                            }
                        }
                    }
                }
            }
            else
//.........这里部分代码省略.........
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:101,代码来源:Common.cs


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