Class ImpEnhancedWebElement

  • All Implemented Interfaces:
    EnhancedWebElement, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement

    public class ImpEnhancedWebElement
    extends Object
    implements EnhancedWebElement
    • Constructor Detail

      • ImpEnhancedWebElement

        public ImpEnhancedWebElement​(EnhancedBy parent,
                                     int parentIndex,
                                     org.openqa.selenium.WebDriver webDriver,
                                     EnhancedBy element)
    • Method Detail

      • clear

        public void clear()
        Specified by:
        clear in interface org.openqa.selenium.WebElement
      • getCssValue

        public String getCssValue​(String arg0)
        Specified by:
        getCssValue in interface org.openqa.selenium.WebElement
      • getLocation

        public org.openqa.selenium.Point getLocation()
        Specified by:
        getLocation in interface org.openqa.selenium.WebElement
      • getSize

        public org.openqa.selenium.Dimension getSize()
        Specified by:
        getSize in interface org.openqa.selenium.WebElement
      • getSize

        public org.openqa.selenium.Dimension getSize​(int index)
      • getTagName

        public String getTagName()
        Specified by:
        getTagName in interface org.openqa.selenium.WebElement
      • getTagName

        public String getTagName​(int index)
      • isDisplayed

        public boolean isDisplayed()
        Specified by:
        isDisplayed in interface org.openqa.selenium.WebElement
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface org.openqa.selenium.WebElement
      • submit

        public void submit()
        Specified by:
        submit in interface org.openqa.selenium.WebElement
      • submit

        public void submit​(int index)
      • click

        public void click()
        Specified by:
        click in interface EnhancedWebElement
        Specified by:
        click in interface org.openqa.selenium.WebElement
      • mobileScroll

        public void mobileScroll​(int index)
        Parameters:
        element -
      • scrollTo_mobile

        public void scrollTo_mobile​(int index)
      • scrollToView_Web_Action

        public void scrollToView_Web_Action​(int index)
        scroll to web element using action
        Parameters:
        index -
      • scrollToView_Web_JS

        public void scrollToView_Web_JS​(int index)
        scroll to web element using javascript
        Parameters:
        index -
      • isExist

        public boolean isExist​(int... index)
        returns if element exists
        Specified by:
        isExist in interface EnhancedWebElement
      • isListExist

        public boolean isListExist()
        returns if any element in a list is displayed
      • isElementExist

        public boolean isElementExist​(int index)
        returns true if element is displayed sets timeout to minimum to get the value quickly
      • isElementFound

        public boolean isElementFound​(int index)
        return if element is found in dom
        Parameters:
        index -
        Returns:
      • getCssSelectorValue

        public String getCssSelectorValue()
      • sendKeys

        public void sendKeys​(CharSequence... keysToSend)
        Specified by:
        sendKeys in interface EnhancedWebElement
        Specified by:
        sendKeys in interface org.openqa.selenium.WebElement
      • sendKeyByAction

        public void sendKeyByAction​(int index,
                                    CharSequence[] keysToSend)
      • get

        public org.openqa.selenium.WebElement get​(int index)
        Specified by:
        get in interface EnhancedWebElement
      • get

        public org.openqa.selenium.WebElement get​(int index,
                                                  boolean isFail)
        Specified by:
        get in interface EnhancedWebElement
      • getText

        public String getText()
        Specified by:
        getText in interface EnhancedWebElement
        Specified by:
        getText in interface org.openqa.selenium.WebElement
      • getSelect

        public org.openqa.selenium.support.ui.Select getSelect​(int index)
        Specified by:
        getSelect in interface EnhancedWebElement
      • getElement

        public org.openqa.selenium.WebElement getElement​(int index)
        gets elements based on index location
        Parameters:
        index -
        Returns:
      • getParentElement

        public void getParentElement()
        gets parent elements and stores in parentElements list
      • getElement

        public List<org.openqa.selenium.WebElement> getElement()
        gets the list of elements, then selects the first visible element from the list in situation where the first elements are not visible, out of view
        Returns:
      • filterLocatorsByDriverType

        public void filterLocatorsByDriverType()
        filter element by driver types (iOS, Android, Web) if Android element or iOS element is specified then use only those elements based on driver type
      • getFirstVisibleElement

        public org.openqa.selenium.WebElement getFirstVisibleElement​(List<org.openqa.selenium.WebElement> elements)
        gets the first visible element filters hidden elements
        Parameters:
        elements -
        Returns:
      • isSelected

        public boolean isSelected()
        Specified by:
        isSelected in interface org.openqa.selenium.WebElement
      • getRect

        public org.openqa.selenium.Rectangle getRect()
        Specified by:
        getRect in interface org.openqa.selenium.WebElement
      • getScreenshotAs

        public <X> X getScreenshotAs​(org.openqa.selenium.OutputType<X> arg0)
                              throws org.openqa.selenium.WebDriverException
        Specified by:
        getScreenshotAs in interface org.openqa.selenium.TakesScreenshot
        Throws:
        org.openqa.selenium.WebDriverException
      • findElements

        public List<org.openqa.selenium.WebElement> findElements​(org.openqa.selenium.By by)
        Specified by:
        findElements in interface org.openqa.selenium.SearchContext
        Specified by:
        findElements in interface org.openqa.selenium.WebElement
      • findElement

        public org.openqa.selenium.WebElement findElement​(org.openqa.selenium.By arg0)
        Specified by:
        findElement in interface org.openqa.selenium.SearchContext
        Specified by:
        findElement in interface org.openqa.selenium.WebElement