Package ai.test.sdk
Class TestAiElement
java.lang.Object
org.openqa.selenium.remote.RemoteWebElement
ai.test.sdk.TestAiElement
- All Implemented Interfaces:
Locatable,FindsByClassName,FindsByCssSelector,FindsById,FindsByLinkText,FindsByName,FindsByTagName,FindsByXPath,HasIdentity,SearchContext,TakesScreenshot,WebElement,WrapsDriver
An enhanced RemoteWebElement which uses the results of the Test.ai classifier for improved accuracy.
- Author:
- Alexander Wu ([email protected])
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidclick()voidclick(boolean jsClick) Attempts to perform a click action on this elementfindElement(By by) findElements(By by) getAttribute(String name) getCssValue(String propertyName) getRect()getSize()getText()booleanbooleanbooleanvoidsendKeys(CharSequence... keysToSend) voidAttempts to type the specified String (value) into this element.voidsubmit()Methods inherited from class org.openqa.selenium.remote.RemoteWebElement
equals, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, getCoordinates, getId, getScreenshotAs, getWrappedDriver, hashCode, setFileDetector, setId, setParent, toJson, toString
-
Method Details
-
getText
- Specified by:
getTextin interfaceWebElement- Overrides:
getTextin classRemoteWebElement
-
getSize
- Specified by:
getSizein interfaceWebElement- Overrides:
getSizein classRemoteWebElement
-
getLocation
- Specified by:
getLocationin interfaceWebElement- Overrides:
getLocationin classRemoteWebElement
-
getRect
- Specified by:
getRectin interfaceWebElement- Overrides:
getRectin classRemoteWebElement
-
getTagName
- Specified by:
getTagNamein interfaceWebElement- Overrides:
getTagNamein classRemoteWebElement
-
clear
public void clear()- Specified by:
clearin interfaceWebElement- Overrides:
clearin classRemoteWebElement
-
findElement
- Specified by:
findElementin interfaceSearchContext- Specified by:
findElementin interfaceWebElement- Overrides:
findElementin classRemoteWebElement
-
findElements
- Specified by:
findElementsin interfaceSearchContext- Specified by:
findElementsin interfaceWebElement- Overrides:
findElementsin classRemoteWebElement
-
getAttribute
- Specified by:
getAttributein interfaceWebElement- Overrides:
getAttributein classRemoteWebElement
-
getCssValue
- Specified by:
getCssValuein interfaceWebElement- Overrides:
getCssValuein classRemoteWebElement
-
isDisplayed
public boolean isDisplayed()- Specified by:
isDisplayedin interfaceWebElement- Overrides:
isDisplayedin classRemoteWebElement
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceWebElement- Overrides:
isEnabledin classRemoteWebElement
-
isSelected
public boolean isSelected()- Specified by:
isSelectedin interfaceWebElement- Overrides:
isSelectedin classRemoteWebElement
-
click
public void click()- Specified by:
clickin interfaceWebElement- Overrides:
clickin classRemoteWebElement
-
click
public void click(boolean jsClick) Attempts to perform a click action on this element- Parameters:
jsClick- Set `true` to use javascript to perform the click.
-
sendKeys
- Specified by:
sendKeysin interfaceWebElement- Overrides:
sendKeysin classRemoteWebElement
-
sendKeys
Attempts to type the specified String (value) into this element.- Parameters:
value- The String to type into this element.clickFirst- Settrueto tap this element (e.g. to focus it) first before sending keys.jsKeys- Settrueto use javascript to set thevalueproperty of this element.
-
submit
public void submit()- Specified by:
submitin interfaceWebElement- Overrides:
submitin classRemoteWebElement
-