protected IWebElement GetModal()
        {
            var getModalWindow = SeleniumCommon.GetElement(_driver, SeleniumCommon.ByType.Id, _modalClassName);
            var getActualModal = getModalWindow.FindElements(By.TagName("div")).FirstOrDefault(a => a.GetAttribute("class").Equals(_modalVisableClass)); //why does this seem to change the id i put in to widget-modal??

            return(getActualModal);
        }
Exemplo n.º 2
0
        public IWebElement GetAssetAddButton()
        {
            var buttons = SeleniumCommon.GetElement(this.Driver, SeleniumCommon.ByType.ClassName, assetsFuncitonBar)
                          .FindElements(By.TagName("button"));
            IWebElement button = buttons.FirstOrDefault(b => b.GetAttribute("title") != null && b.GetAttribute("title").Equals("Add New Asset", StringComparison.OrdinalIgnoreCase));

            return(button);
        }
Exemplo n.º 3
0
        public void PlayerDetailSelectScreenConnect()
        {
            var         links = SeleniumCommon.GetElement(this.Driver, SeleniumCommon.ByType.ClassName, _pdwurtStatusWrapper).FindElements(By.TagName("i"));
            IWebElement link  = links.FirstOrDefault(a => a.GetAttribute("class") != null &&
                                                     a.GetAttribute("class").Equals("fa fa-plug", StringComparison.OrdinalIgnoreCase));

            link.Click();
        }
Exemplo n.º 4
0
        private IWebElement GetChannelSelection()
        {
            var getModalSection = SeleniumCommon.GetElement(_driver, SeleniumCommon.ByType.ClassName, _modalSection);
            var inputFields     = getModalSection.FindElements(By.TagName("select")).ToList();

            return(inputFields.FirstOrDefault(a => a.GetAttribute("id") != null && a.GetAttribute("id")
                                              .Equals("select-filter", StringComparison.OrdinalIgnoreCase)));
        }
Exemplo n.º 5
0
        private IWebElement GetPlayer(string playerName)
        {
            IWebElement playerTable = SeleniumCommon.GetElement(Driver, SeleniumCommon.ByType.Css, _playersTableTBody);

            IEnumerable <IWebElement> trs = playerTable.FindElements(By.TagName("tr")).ToList();
            IWebElement tdItem            = trs.FirstOrDefault(tr => tr.FindElements(By.TagName("td")) != null && tr.GetInnerHTML().Contains(playerName));
            var         playerSelect      = tdItem.FindElements(By.TagName("span")).FirstOrDefault(a => string.Equals(a.Text, playerName, StringComparison.OrdinalIgnoreCase));

            return(playerSelect);
        }
Exemplo n.º 6
0
        private IWebElement GetLocation(string locationName)
        {
            //IWebElement playerTable = SeleniumCommon.GetElement(Driver, SeleniumCommon.ByType.Id, "players-table");
            IWebElement locationTable = SeleniumCommon.GetElement(Driver, SeleniumCommon.ByType.Css, _locationsTableTBody);

            IEnumerable <IWebElement> trs = locationTable.FindElements(By.TagName("tr")).ToList();
            IWebElement tdItem            = trs.FirstOrDefault(tr => tr.FindElements(By.TagName("td")) != null && tr.GetInnerHTML().Contains(locationName));
            var         locationSelect    = tdItem.FindElements(By.TagName("td")).FirstOrDefault(a => string.Equals(a.Text, locationName, StringComparison.OrdinalIgnoreCase));

            //t => t.GetElementFromCompoundClass(By.TagName("span"),
            // _playerNameTdItem) != null && t.GetElementFromCompoundClass(By.TagName("span"),
            // _playerNameTdItem).Text.Equals(playerName, StringComparison.OrdinalIgnoreCase));

            return(locationSelect);
        }
Exemplo n.º 7
0
        public IWebElement GetAssetSearchInput()
        {
            IWebElement searchInput = SeleniumCommon.GetElement(this.Driver, SeleniumCommon.ByType.Id, assetsSearchInput);

            return(searchInput);
        }
 private IEnumerable <IWebElement> UtilButtons()
 {
     return(SeleniumCommon.GetElement(_driver, SeleniumCommon.ByType.ClassName, _utilsRowSection).FindElements(By.TagName("button")));
 }