Package core.uiCore.webElement
Class ImpEnhancedWebElement
- java.lang.Object
-
- core.uiCore.webElement.ImpEnhancedWebElement
-
- All Implemented Interfaces:
EnhancedWebElement,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement
public class ImpEnhancedWebElement extends Object implements EnhancedWebElement
-
-
Field Summary
Fields Modifier and Type Field Description Element.LocatorTypelocatorType
-
Constructor Summary
Constructors Constructor Description ImpEnhancedWebElement(EnhancedBy parent, int parentIndex, org.openqa.selenium.WebDriver webDriver, EnhancedBy element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclear(int index)voidclick()voidclick(int index)intcount()EnhancedWebElementfindElement(EnhancedBy parentElement, int parentIndex, EnhancedBy element)org.openqa.selenium.WebElementfindElement(org.openqa.selenium.By arg0)List<org.openqa.selenium.WebElement>findElements(org.openqa.selenium.By by)org.openqa.selenium.WebElementget(int index)StringgetAttribute(int index, String name)StringgetAttribute(String name)StringgetAttribute(String name, int index)org.openqa.selenium.BygetBy()StringgetCssSelectorValue()StringgetCssValue(String arg0)StringgetCssValue(String arg0, int index)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 vieworg.openqa.selenium.WebElementgetElement(int index)gets elements based on index locationorg.openqa.selenium.BygetElementCssSelector()org.openqa.selenium.BygetElementCssSelector(int index)StringgetElementName()StringgetElementName(int index)List<org.openqa.selenium.WebElement>getElements()org.openqa.selenium.WebElementgetFirstVisibleElement(List<org.openqa.selenium.WebElement> elements)gets the first visible element filters hidden elementsorg.openqa.selenium.PointgetLocation()org.openqa.selenium.PointgetLocation(int index)voidgetParentElement()gets parent elements and stores in parentElements listorg.openqa.selenium.RectanglegetRect()<X> XgetScreenshotAs(org.openqa.selenium.OutputType<X> arg0)org.openqa.selenium.support.ui.SelectgetSelect(int index)org.openqa.selenium.DimensiongetSize()org.openqa.selenium.DimensiongetSize(int index)StringgetTagName()StringgetTagName(int index)StringgetText()StringgetText(int index)List<String>getTextList()booleanisDisplayed()booleanisDisplayed(int index)booleanisElementExist(int index)returns true if element is displayed sets timeout to minimum to get the value quicklybooleanisEmpty()booleanisEnabled()booleanisEnabled(int index)booleanisExist(int... index)returns if element existsbooleanisListExist()returns if any element in a list is displayedbooleanisSelected()voidmobileScroll(int index)voidmoveMouse()voidmoveMouse(int index)voidscrollTo_mobile(int index)voidscrollToView()voidscrollToView(int index)voidscrollToView_Web(int index)scroll to element on webvoidsendKeyByAction(int index, CharSequence[] keysToSend)voidsendKeyByJs(int index, CharSequence[] keysToSend)voidsendKeys(int index, CharSequence... keysToSend)voidsendKeys(CharSequence... keysToSend)voidsendKeysByAction(int index, CharSequence... keysToSend)voidsetAttribute(String attribute, int index, String value)voidsetAttribute(String attribute, String value)voidsetValue(int index, CharSequence... keysToSend)voidsubmit()voidsubmit(int index)
-
-
-
Field Detail
-
locatorType
public Element.LocatorType locatorType
-
-
Constructor Detail
-
ImpEnhancedWebElement
public ImpEnhancedWebElement(EnhancedBy parent, int parentIndex, org.openqa.selenium.WebDriver webDriver, EnhancedBy element)
-
-
Method Detail
-
findElement
public EnhancedWebElement findElement(EnhancedBy parentElement, int parentIndex, EnhancedBy element)
- Specified by:
findElementin interfaceEnhancedWebElement
-
clear
public void clear()
- Specified by:
clearin interfaceorg.openqa.selenium.WebElement
-
clear
public void clear(int index)
- Specified by:
clearin interfaceEnhancedWebElement
-
getCssValue
public String getCssValue(String arg0)
- Specified by:
getCssValuein interfaceorg.openqa.selenium.WebElement
-
getCssValue
public String getCssValue(String arg0, int index)
- Specified by:
getCssValuein interfaceEnhancedWebElement
-
getLocation
public org.openqa.selenium.Point getLocation()
- Specified by:
getLocationin interfaceorg.openqa.selenium.WebElement
-
getLocation
public org.openqa.selenium.Point getLocation(int index)
- Specified by:
getLocationin interfaceEnhancedWebElement
-
getSize
public org.openqa.selenium.Dimension getSize()
- Specified by:
getSizein interfaceorg.openqa.selenium.WebElement
-
getSize
public org.openqa.selenium.Dimension getSize(int index)
-
count
public int count()
- Specified by:
countin interfaceEnhancedWebElement
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceEnhancedWebElement
-
getTagName
public String getTagName()
- Specified by:
getTagNamein interfaceorg.openqa.selenium.WebElement
-
getTagName
public String getTagName(int index)
-
isDisplayed
public boolean isDisplayed()
- Specified by:
isDisplayedin interfaceorg.openqa.selenium.WebElement
-
isDisplayed
public boolean isDisplayed(int index)
- Specified by:
isDisplayedin interfaceEnhancedWebElement
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceorg.openqa.selenium.WebElement
-
isEnabled
public boolean isEnabled(int index)
- Specified by:
isEnabledin interfaceEnhancedWebElement
-
submit
public void submit()
- Specified by:
submitin interfaceorg.openqa.selenium.WebElement
-
submit
public void submit(int index)
-
click
public void click()
- Specified by:
clickin interfaceEnhancedWebElement- Specified by:
clickin interfaceorg.openqa.selenium.WebElement
-
click
public void click(int index)
- Specified by:
clickin interfaceEnhancedWebElement
-
scrollToView
public void scrollToView()
- Specified by:
scrollToViewin interfaceEnhancedWebElement
-
scrollToView
public void scrollToView(int index)
- Specified by:
scrollToViewin interfaceEnhancedWebElement
-
mobileScroll
public void mobileScroll(int index)
- Parameters:
element-
-
scrollTo_mobile
public void scrollTo_mobile(int index)
-
scrollToView_Web
public void scrollToView_Web(int index)
scroll to element on web- Specified by:
scrollToView_Webin interfaceEnhancedWebElement
-
isExist
public boolean isExist(int... index)
returns if element exists- Specified by:
isExistin interfaceEnhancedWebElement
-
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
-
moveMouse
public void moveMouse()
- Specified by:
moveMousein interfaceEnhancedWebElement
-
moveMouse
public void moveMouse(int index)
- Specified by:
moveMousein interfaceEnhancedWebElement
-
getBy
public org.openqa.selenium.By getBy()
- Specified by:
getByin interfaceEnhancedWebElement
-
getCssSelectorValue
public String getCssSelectorValue()
-
setValue
public void setValue(int index, CharSequence... keysToSend)- Specified by:
setValuein interfaceEnhancedWebElement
-
sendKeys
public void sendKeys(CharSequence... keysToSend)
- Specified by:
sendKeysin interfaceEnhancedWebElement- Specified by:
sendKeysin interfaceorg.openqa.selenium.WebElement
-
sendKeys
public void sendKeys(int index, CharSequence... keysToSend)- Specified by:
sendKeysin interfaceEnhancedWebElement
-
sendKeysByAction
public void sendKeysByAction(int index, CharSequence... keysToSend)- Specified by:
sendKeysByActionin interfaceEnhancedWebElement
-
sendKeyByJs
public void sendKeyByJs(int index, CharSequence[] keysToSend)- Specified by:
sendKeyByJsin interfaceEnhancedWebElement
-
sendKeyByAction
public void sendKeyByAction(int index, CharSequence[] keysToSend)
-
getAttribute
public String getAttribute(String name)
- Specified by:
getAttributein interfaceEnhancedWebElement- Specified by:
getAttributein interfaceorg.openqa.selenium.WebElement
-
getAttribute
public String getAttribute(String name, int index)
- Specified by:
getAttributein interfaceEnhancedWebElement
-
setAttribute
public void setAttribute(String attribute, String value)
- Specified by:
setAttributein interfaceEnhancedWebElement
-
setAttribute
public void setAttribute(String attribute, int index, String value)
- Specified by:
setAttributein interfaceEnhancedWebElement
-
get
public org.openqa.selenium.WebElement get(int index)
- Specified by:
getin interfaceEnhancedWebElement
-
getText
public String getText()
- Specified by:
getTextin interfaceEnhancedWebElement- Specified by:
getTextin interfaceorg.openqa.selenium.WebElement
-
getText
public String getText(int index)
- Specified by:
getTextin interfaceEnhancedWebElement
-
getTextList
public List<String> getTextList()
- Specified by:
getTextListin interfaceEnhancedWebElement
-
getElementName
public String getElementName()
- Specified by:
getElementNamein interfaceEnhancedWebElement
-
getSelect
public org.openqa.selenium.support.ui.Select getSelect(int index)
- Specified by:
getSelectin interfaceEnhancedWebElement
-
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:
-
getElements
public List<org.openqa.selenium.WebElement> getElements()
- Specified by:
getElementsin interfaceEnhancedWebElement
-
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:
isSelectedin interfaceorg.openqa.selenium.WebElement
-
getElementCssSelector
public org.openqa.selenium.By getElementCssSelector()
- Specified by:
getElementCssSelectorin interfaceEnhancedWebElement
-
getRect
public org.openqa.selenium.Rectangle getRect()
- Specified by:
getRectin interfaceorg.openqa.selenium.WebElement
-
getScreenshotAs
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> arg0) throws org.openqa.selenium.WebDriverException- Specified by:
getScreenshotAsin interfaceorg.openqa.selenium.TakesScreenshot- Throws:
org.openqa.selenium.WebDriverException
-
findElements
public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
- Specified by:
findElementsin interfaceorg.openqa.selenium.SearchContext- Specified by:
findElementsin interfaceorg.openqa.selenium.WebElement
-
getElementCssSelector
public org.openqa.selenium.By getElementCssSelector(int index)
- Specified by:
getElementCssSelectorin interfaceEnhancedWebElement
-
getAttribute
public String getAttribute(int index, String name)
- Specified by:
getAttributein interfaceEnhancedWebElement
-
getElementName
public String getElementName(int index)
- Specified by:
getElementNamein interfaceEnhancedWebElement
-
findElement
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By arg0)
- Specified by:
findElementin interfaceorg.openqa.selenium.SearchContext- Specified by:
findElementin interfaceorg.openqa.selenium.WebElement
-
-