Package | Description |
---|---|
com.abmash.api |
Provides the main classes to control browsers and to find and interact with elements on the current web page.
|
com.abmash.api.browser |
Provides classes to extend the
Browser functionality and to further interact with it. |
com.abmash.api.query |
Provides classes to find elements on web pages.
|
com.abmash.core.browser.interaction |
Provides classes to interact with the browser and its elements.
|
com.abmash.core.browser.waitcondition |
Provides classes to wait for certain events or conditions in order to properly react to changes (AJAX, Websockets, etc.).
|
Modifier and Type | Method and Description |
---|---|
HtmlElement |
Browser.checkToggle(java.lang.String checkable)
Searches for checkbox input field and toggles it.
|
HtmlElement |
HtmlElement.choose(java.lang.String optionQuery)
Chooses option/item from select field
|
HtmlElement |
Browser.choose(java.lang.String choosable,
java.lang.String option)
Searches for dropdown/list input field and selects the specified option.
|
HtmlElement |
HtmlElement.chooseDate(org.joda.time.DateTime dateTime)
Selects the specified date.
|
HtmlElement |
Browser.chooseDate(java.lang.String datepicker,
org.joda.time.DateTime dateTime)
Searches for calendar/date picker input fields and selects the specified date.
|
HtmlElement |
HtmlElement.clear()
Clears entered text in element.
|
HtmlElement |
HtmlElement.click()
Clicks on element.
|
HtmlElement |
Browser.click(java.lang.String clickable)
Searches for a clickable element with specified query string and clicks it.
|
HtmlElement |
HtmlElement.doubleClick()
Doubleclicks on element.
|
HtmlElement |
Browser.drag(java.lang.String elementToDrag,
java.lang.String elemenToDropOn)
Searches for a element with specified query string and drags it with the mouse to another element.
|
HtmlElement |
HtmlElement.dragTo(HtmlElement targetElement)
Drags an element with the mouse on another element.
|
HtmlElement |
HtmlElements.first()
Gets the first item of the list.
|
HtmlElement |
HtmlElement.getFrameElement()
Gets frame element if this element is located in a frame or iframe.
|
HtmlElement |
HtmlElement.getParent()
Gets the parent of this element in the document structure.
|
HtmlElement |
HtmlElement.hover()
Hovers on element with the mouse.
|
HtmlElement |
Browser.hover(java.lang.String clickable)
Searches for a element with specified query string and hovers it with the mouse.
|
HtmlElement |
HtmlElement.keyHold(java.lang.String keyName)
Holds key on element.
|
HtmlElement |
HtmlElement.keyPress(java.lang.String keyName)
Presses key on element.
|
HtmlElement |
HtmlElement.keyRelease(java.lang.String keyName)
Releases key on element.
|
HtmlElement |
HtmlElements.last()
Gets the last item of the list.
|
HtmlElement |
HtmlElements.nth(int index)
Gets the nth item of the list.
|
HtmlElement |
HtmlElement.rightClick()
Rightclicks on element to open the context menu.
|
HtmlElement |
HtmlElements.second()
Gets the second item of the list.
|
HtmlElement |
HtmlElement.submit()
Submits the form linked to this element.
|
HtmlElement |
Browser.submit(java.lang.String submittable)
Submits the form, which contains the given form element.
|
HtmlElement |
HtmlElements.third()
Gets the third item of the list.
|
HtmlElement |
HtmlElement.type(java.lang.String text)
Enters text in element.
|
HtmlElement |
Browser.type(java.lang.String typable,
java.lang.String text)
Searches for element with specified query string and enters the text.
|
HtmlElement |
HtmlElement.unchoose(java.lang.String optionQuery)
Deselects option/item from select field
|
HtmlElement |
Browser.unchoose(java.lang.String choosable,
java.lang.String option)
Searches for dropdown/list input field and deselects the specified option.
|
Modifier and Type | Method and Description |
---|---|
boolean |
HtmlElements.add(HtmlElement element)
Adds an
HtmlElement to the list. |
boolean |
HtmlElements.addAndIgnoreDuplicates(HtmlElement element)
Adds an
HtmlElement if it not exists in the list yet. |
boolean |
HtmlElements.contains(HtmlElement element)
Checks if the list contains a HtmlElement.
|
HtmlElements |
HtmlElements.dragTo(HtmlElement targetElement)
Drags all elements to a target element.
|
HtmlElement |
HtmlElement.dragTo(HtmlElement targetElement)
Drags an element with the mouse on another element.
|
boolean |
HtmlElement.equals(HtmlElement otherElement)
Checks if element is equal to other element
|
void |
HtmlElement.setFrameElement(HtmlElement frameElement)
Sets frame element if this element is located in a frame or iframe.
|
void |
HtmlElement.setReferenceElements(HtmlElement referenceElement)
Sets reference element, which is needed for internal closeness calculations.
|
Modifier and Type | Method and Description |
---|---|
boolean |
HtmlElements.addAll(java.util.Collection<? extends HtmlElement> elements)
Adds all
HtmlElements to the list. |
boolean |
HtmlElements.addAllAndIgnoreDuplicates(java.util.Collection<? extends HtmlElement> elements)
Adds all
HtmlElements not existing in the list yet. |
Constructor and Description |
---|
HtmlElements(HtmlElement element)
Constructs new list with one element.
|
Modifier and Type | Method and Description |
---|---|
void |
WaitFor.elementText(HtmlElement element,
java.lang.String text)
Waits until element contains the specified text.
|
void |
Debug.highlight(HtmlElement element)
Debug method which highlights the given
HtmlElement with a red dashed border. |
void |
Frame.switchTo(HtmlElement frame)
Switches to frame which is specified by given
HtmlElement . |
Modifier and Type | Method and Description |
---|---|
HtmlElement |
Query.findFirst()
Finds all elements that match the given predicates and returns the first result.
|
HtmlElement |
Query.findFirstWithWait()
Finds all elements that match the given predicates and returns the first result.
|
Modifier and Type | Method and Description |
---|---|
static Predicate |
QueryFactory.above(HtmlElement element)
Finds elements visually above the given
HtmlElement . |
static Predicate |
QueryFactory.aboveAll(HtmlElement element)
Finds elements visually above all the elements that match the given
HtmlElement . |
static Predicate |
QueryFactory.below(HtmlElement element)
Finds elements visually below the given
HtmlElement . |
static Predicate |
QueryFactory.belowAll(HtmlElement element)
Finds elements visually below all the elements that match the given
HtmlElement . |
static Predicate |
QueryFactory.closeTo(DirectionOptions options,
HtmlElement element)
Finds elements visually close to the given
HtmlElement . |
static Predicate |
QueryFactory.closeTo(HtmlElement element)
Finds elements visually close to the given
HtmlElement , with a maximum distance of 300 pixels. |
static Predicate |
QueryFactory.closeTo(int maxDistance,
HtmlElement element)
Finds elements visually close to the given
HtmlElement , with a maximum distance. |
static Predicate |
QueryFactory.leftOf(HtmlElement element)
Finds elements visually left of the given
HtmlElement . |
static Predicate |
QueryFactory.leftOfAll(HtmlElement element)
Finds elements visually left of all the elements that match the given
HtmlElement . |
static Predicate |
QueryFactory.rightOf(HtmlElement element)
Finds elements visually right of the given
HtmlElement . |
static Predicate |
QueryFactory.rightOfAll(HtmlElement element)
Finds elements visually right of all the elements that match the given
HtmlElement . |
Constructor and Description |
---|
ActionOnHtmlElement(Browser browser,
HtmlElement element) |
Clear(Browser browser,
HtmlElement element) |
Click(Browser browser,
HtmlElement element,
Click.ClickType clickType) |
DragTo(Browser browser,
HtmlElement sourceElement,
HtmlElement targetElement) |
Hover(Browser browser,
HtmlElement element) |
KeyHold(Browser browser,
HtmlElement sourceElement,
java.lang.String keyName) |
KeyPress(Browser browser,
HtmlElement element,
java.lang.String keyName) |
KeyRelease(Browser browser,
HtmlElement sourceElement,
java.lang.String keyName) |
Select(Browser browser,
HtmlElement element,
java.lang.String optionQuery,
Select.SelectMethod method) |
Submit(Browser browser,
HtmlElement element,
Submit.SubmitMethod method) |
Type(Browser browser,
HtmlElement element,
java.lang.String text) |
Constructor and Description |
---|
ElementHasTextWaitCondition(HtmlElement element,
java.lang.String text) |