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


C# IWebElement.Equals方法代码示例

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


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

示例1: SupplierHomePage

 public SupplierHomePage(IWebDriver driver)
 {
     _driver = driver;
     PageReached = false;
     OrdersDropdown = HelperMethods.FindElement(_driver, Constants.SearchType.LINKTEXT, "Order Fulfillment");
     if (OrdersDropdown.Equals(null))
     {
         _logger.Fatal(" > Supplier Homepage navigation [FAILED]");
         _logger.Fatal("-- TEST FAILURE @ URL: '" + driver.Url + "' --");
         BaseDriverTest.TakeScreenshot("screenshot");
     }
     else
     {
         _logger.Info(" > Member Homepage reached!");
         PageReached = true;
     }
 }
开发者ID:milan-lbmx,项目名称:LBMXRegressionAutomation,代码行数:17,代码来源:SupplierHomePage.cs

示例2: MemberHomePage

 /// <summary>
 /// Member home page constructor
 /// </summary>
 /// <param name="driver">Main interface for testing, represents idealised web browser</param>
 public MemberHomePage(IWebDriver driver)
 {
     _driver = driver;
     PageReached = false;
     OrdersDropdown = HelperMethods.FindElement(driver, Constants.SearchType.LINKTEXT, "My Orders");
     // check if on correct page
     if (OrdersDropdown.Equals(null))
     {
         _logger.Fatal(" > Member Homepage navigation [FAILED]");
         _logger.Fatal("-- TEST FAILURE @ URL: '" + driver.Url + "' --");
         BaseDriverTest.TakeScreenshot("screenshot");
     }
     else
     {
         _logger.Info(" > Member Homepage reached!");
         _logger.Info(" > Login successful");
         PageReached = true;
     }
 }
开发者ID:milan-lbmx,项目名称:LBMXRegressionAutomation,代码行数:23,代码来源:MemberHomePage.cs

示例3: LoadAdvancedSearch

 /// <summary>
 /// Loads advanced search options for this mailbox. Clicks the Advanced Search link
 /// and loads the corresponding elements.
 /// </summary>
 /// <returns>Current page element.</returns>
 internal POInboxPage LoadAdvancedSearch()
 {
     _logger.Trace(" > Attempting to load PO Inbox Advanced Search...");
     ASButton.Click();
     Thread.Sleep(500);
     //TODO: update after changes pushed
     //ASStatus = StatusDropdowns[1]; 
     ASPeriod = _periodDropdowns[1];
     ASFrom = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.AS_FROM);
     ASShipTo = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.AS_SHIP_TO);
     ASSearchBtn = HelperMethods.FindElement(_driver, Constants.SearchType.ID, Constants.BaseMailbox.ID.AS_SEARCH_BTN);
     ASClearBtn = HelperMethods.FindElement(_driver, Constants.SearchType.ID, Constants.BaseMailbox.ID.AS_CLEAR_BTN);
     ASBackToBasicBtn = HelperMethods.FindElement(_driver, Constants.SearchType.ID, Constants.BaseMailbox.ID.AS_BASIC_BTN);
     if (!ASPeriod.Equals(null) && !ASFrom.Equals(null) && !ASShipTo.Equals(null) &&
         !ASSearchBtn.Equals(null) && !ASClearBtn.Equals(null) && !ASBackToBasicBtn.Equals(null))
     {
         _logger.Info(" > PO Inbox Advanced Search Loaded!");
         AdvLoadSuccess = true;
         BasicLoadSuccess = false;
     }
     return this;
 }
开发者ID:milan-lbmx,项目名称:LBMXRegressionAutomation,代码行数:27,代码来源:POInboxPage.cs

示例4: LoadPeriodDropdown

        private BaseInboxPage LoadPeriodDropdown()
        {
            _logger.Trace(" > Loading mailbox Period  dropdown...");
            _periodListCount = _driver.FindElements(By.XPath(Constants.BaseMailbox.XP.PERIOD_COUNT));
            if (_periodListCount.Count <= 4)
            {
                PeriodLast90 = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.BaseMailbox.XP.PERIOD_LAST90);
                Period2016 = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.BaseMailbox.XP.PERIOD_2016);
                Period2015 = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.BaseMailbox.XP.PERIOD_2015);
                Period2014 = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.BaseMailbox.XP.PERIOD_2014);

                if (!PeriodLast90.Equals(null) && !Period2016.Equals(null) && !Period2015.Equals(null) && !Period2014.Equals(null))
                {
                    _logger.Info(" > Load Period dropdown success!");
                    PeriodDropdownSuccess = true;
                }
            }
            return this;
        }
开发者ID:milan-lbmx,项目名称:LBMXRegressionAutomation,代码行数:19,代码来源:BaseInboxPage.cs

示例5: LoadGridItemAmountDropdown

        private BaseInboxPage LoadGridItemAmountDropdown()
        {
            _logger.Trace(" > Loading grid item amount dropdown...");
            GridItemAmt10 = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.PAGE_AMT_10);
            GridItemAmt20 = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.PAGE_AMT_20);
            GridItemAmt50 = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.PAGE_AMT_50);
            GridItemAmt100 = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.PAGE_AMT_100);

            if (!GridItemAmt10.Equals(null) && !GridItemAmt20.Equals(null) &&
                !GridItemAmt50.Equals(null) && !GridItemAmt100.Equals(null))
                GridAmountDropdownSuccess = true;

            return this;
        }
开发者ID:milan-lbmx,项目名称:LBMXRegressionAutomation,代码行数:14,代码来源:BaseInboxPage.cs

示例6: LoadNavigationRow

        /// <summary>
        /// Method to load the bottom navigation row of the grid. This method is used to load
        /// the row elements before each navigation to avoid stale elements.
        /// </summary>
        /// <returns>Current page object.</returns>
        private BaseInboxPage LoadNavigationRow()
        {
            _logger.Trace(" > Attempting to load navigation row...");
            _navPages = new List<IWebElement>();
            _navPages = _driver.FindElements(By.XPath(Constants.POMailbox.XP.PAGE_NUM));
            FirstPageBtn = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.FIRST_PAGE_NAV);
            PrevPageBtn = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.PREV_PAGE_NAV);
            NextPageBtn = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.NEXT_PAGE_NAV);
            LastPageBtn = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.LAST_PAGE_NAV);
            GridItemAmountDropdown = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.PAGE_DROPDOWN);
            PageLabel = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.PAGE_INFO_LBL);
            PageRefreshBtn = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.POMailbox.XP.PAGE_REFRESH);

            // verification
            if(!FirstPageBtn.Equals(null) && !PrevPageBtn.Equals(null) && !NextPageBtn.Equals(null)
                && !LastPageBtn.Equals(null) && !GridItemAmountDropdown.Equals(null) && !PageLabel.Equals(null)
                && !PageRefreshBtn.Equals(null) && !_navPages.Any())
            {
                _logger.Info(" > Mailbox navigation row loaded!");
                NavRowSuccess = true;
            } 
            else
            {
                _logger.Info(" > Problem loading mailbox navigation row!");
                NavRowSuccess = true;
            }
            return this;
        }
开发者ID:milan-lbmx,项目名称:LBMXRegressionAutomation,代码行数:33,代码来源:BaseInboxPage.cs

示例7: LoadStatusDropdown

        private BaseInboxPage LoadStatusDropdown()
        {
            _logger.Trace(" > Loading mailbox Status dropdown...");
            StatusAll = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.BaseMailbox.XP.STATUS_ALL);
            StatusProcessed = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.BaseMailbox.XP.STATUS_PROCESSED);
            StatusUnprocessed = HelperMethods.FindElement(_driver, Constants.SearchType.XPATH, Constants.BaseMailbox.XP.STATUS_UNPROCESSED);

            if (!StatusAll.Equals(null) && !StatusProcessed.Equals(null) && !StatusUnprocessed.Equals(null))
            {
                _logger.Info(" > Mailbox Status dropdown loaded!");
                StatusDropdownSuccess = true;
            }
            return this;
        }
开发者ID:milan-lbmx,项目名称:LBMXRegressionAutomation,代码行数:14,代码来源:BaseInboxPage.cs


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