Example #1
0
        public void Click(int index = 0)
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            this.ElementHelpers.Click(this.MainLocator, index);

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);
        }
Example #2
0
        public void MouseOver()
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            this.ElementHelpers.MouseOverJs(this.ElementHelpers.FindElement(this.MainLocator));

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator);
        }
Example #3
0
        public void WaitForIt()
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            Wait.ForElement(this.MainLocator);

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator);
        }
Example #4
0
        public bool IsCheckedByJs(int index = 0)
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            Wait.StandardWait();

            return(this.ElementHelpers.SelectedByJs(this.MainLocator, index));
        }
Example #5
0
        private void ClickByJsForVtYtdPtd(int index = 0)
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            this.ElementHelpers.ClickByJs(By.CssSelector("bs-checkbox :nth-child(2)"), index);

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);
        }
Example #6
0
        private void ClickByJsForVt(int index = 0)
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            this.ElementHelpers.ClickByJs(By.XPath("//h3[contains(text(), 'Value Types')]/../..//*[contains(@class,'value-picker__item ')]/label/input"), index, 0);

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);
        }
Example #7
0
        public string GetPageTitle()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name);

            Wait.StandardWait();

            return(DriverSingleton.Driver.Title);
        }
Example #8
0
        public void ClickByJs()
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            Wait.StandardWait();

            this.ElementHelpers.ClickByJs(this.MainLocator);

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator);
        }
Example #9
0
        public void Uncheck()
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            if (this.IsChecked())
            {
                this.Click();
            }

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator);
        }
Example #10
0
        public void CheckByJsForVt(int index = 0)
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            if (!this.IsCheckedByJsForVt(index))
            {
                this.ClickByJsForVt(index);
            }

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);
        }
Example #11
0
        public void EnterValueByJs(string value)
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator, value);

            if (value != null)
            {
                this.ElementHelpers.SendKeysByJs(this.MainLocator, value);
            }

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator, value);
        }
Example #12
0
        public void SelectValue(string value)
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator, value);

            if (value != null)
            {
                this.ElementHelpers.Click(this.MainLocator);
            }

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator, value);
        }
Example #13
0
        public void UncheckByJsVtYtdPtd(int index = 0)
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            Wait.StandardWait();

            if (this.IsCheckedByJsForVtYtdPtd(index))
            {
                this.ClickByJsForVtYtdPtd(index);
            }

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);
        }
Example #14
0
        public void SetValue(bool?value)
        {
            LoggerElements.LogStart(MethodBase.GetCurrentMethod().Name, this.MainLocator, value);

            if (value != null)
            {
                if (value == true)
                {
                    this.Check();
                }
                else
                {
                    this.Uncheck();
                }
            }

            LoggerElements.LogEnd(MethodBase.GetCurrentMethod().Name, this.MainLocator, value);
        }
Example #15
0
        public string GetCssValue(string propertyName)
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator, propertyName);

            return(this.ElementHelpers.GetCssValue(this.MainLocator, propertyName));
        }
Example #16
0
        private bool IsElementPresent()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.ElementHelpers.IsElementPresent(this.MainLocator));
        }
Example #17
0
        public bool Disabled(int index = 0)
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            return(this.ElementHelpers.DisabledByJs(this.MainLocator, index));
        }
Example #18
0
        public bool IsReadOnly()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.IsVisible() && !this.IsActive());
        }
Example #19
0
        public IWebElement GetIfAvaiable()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.ElementHelpers.FindElement(this.MainLocator, false));
        }
Example #20
0
        public bool IsLinkActive()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.ElementHelpers.IsLinkActive(this.MainLocator));
        }
Example #21
0
        private bool IsCheckedByJsForVtYtdPtd(int index = 0)
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            return(this.ElementHelpers.SelectedByJs(By.CssSelector("bs-checkbox [class='checkbox__input']"), index));
        }
Example #22
0
        public string GetTextByJs()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.ElementHelpers.GetTextByJs(this.MainLocator));
        }
Example #23
0
        public string GetValue()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.ElementHelpers.FindElement(this.MainLocator).GetAttribute("value"));
        }
Example #24
0
        private bool IsCheckedByJsForVt(int index = 0)
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            return(this.ElementHelpers.SelectedByJs(By.XPath("//h3[contains(text(), 'Value Types')]/../..//*[contains(@class,'value-picker__item ')]/label/input"), index));
        }
Example #25
0
        public string GetAttribute(string attributeName, int index = 0)
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator, attributeName, index);

            return(this.ElementHelpers.GetAttribute(this.MainLocator, attributeName, index));
        }
Example #26
0
        public int Count()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.ElementHelpers.FindElements(this.MainLocator).Count);
        }
Example #27
0
        public string GetText(int index = 0)
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator, index);

            return(this.ElementHelpers.GetText(this.MainLocator, index));
        }
Example #28
0
        public bool IsVisible()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.IsElementPresent() && this.ElementHelpers.FindElement(this.MainLocator).Displayed);
        }
Example #29
0
        public bool IsActive()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.ElementHelpers.FindElement(this.MainLocator).Enabled);
        }
Example #30
0
        public bool IsChecked()
        {
            LoggerElements.LogReturn(MethodBase.GetCurrentMethod().Name, this.MainLocator);

            return(this.ElementHelpers.FindElement(this.MainLocator).Selected);
        }