Graphene Selenium: API 2.0.0.Alpha1

org.jboss.arquillian.ajocado.framework
Interface ExtendedTypedSelenium

All Superinterfaces:
TypedSelenium
All Known Subinterfaces:
AjaxSelenium, GrapheneSelenium

public interface ExtendedTypedSelenium
extends TypedSelenium

Extends the common Selenium API by other useful functions.

Version:
$Revision$
Author:
Lukas Fryc

Method Summary
 boolean belongsClass(ElementLocator<?> elementLocator, String className)
          Checks if element given by locator is member of CSS class given by className.
 void check(ElementLocator<?> locator, boolean checked)
           Check a toggle-button (checkbox/radio) on or off.
 void doCommand(String command, String param1, String param2)
          Invokes selenium command.
 int getCount(IterableLocator<?> locator)
          Returns the number of elements that match the specified locator.
<R,T extends CssResolver<R>>
R
getStyle(ElementLocator<?> elementLocator, T cssResolver)
          Get current style value of element given by locator.
 boolean isAttributePresent(AttributeLocator<?> attributeLocator)
          Verifies that the specified attribute is defined for the element.
 boolean isStarted()
          Indicates if selenium session was already successfully started.
 void mouseOutAt(ElementLocator<?> elementLocator, Point point)
          Simulates a user hovering a mouse out of the specified element at specific coordinates relative to element.
 void mouseOverAt(ElementLocator<?> elementLocator, Point point)
          Simulates a user hovering a mouse over the specified element at specific coordinates relative to element.
 void scrollIntoView(ElementLocator<?> elementLocator, boolean alignToTop)
          Aligns screen to top (resp.
 
Methods inherited from interface org.jboss.arquillian.ajocado.framework.TypedSelenium
addCustomRequestHeader, addLocationStrategy, addScript, addSelection, allowNativeXpath, altKeyDown, altKeyUp, answerOnNextPrompt, assignId, captureEntirePageScreenshot, captureNetworkTraffic, captureScreenshot, check, chooseCancelOnNextConfirmation, chooseOkOnNextConfirmation, click, clickAt, close, containsScript, contextMenu, contextMenuAt, controlKeyDown, controlKeyUp, createCookie, createCookie, deleteAllVisibleCookies, deleteCookie, deselectPopUp, doubleClick, doubleClickAt, dragAndDrop, dragAndDropToObject, fireEvent, focus, getAlert, getAllCookies, getAllWindowIds, getAttribute, getAttribute, getBodyText, getConfirmation, getCookieByName, getCursorPosition, getElementDimension, getElementHeight, getElementIndex, getElementPosition, getElementPositionLeft, getElementPositionTop, getElementWidth, getEval, getHtmlSource, getLocation, getMouseSpeed, getPrompt, getSelectedId, getSelectedIds, getSelectedIndex, getSelectedIndexes, getSelectedLabel, getSelectedLabels, getSelectedValue, getSelectedValues, getSelectOptions, getSpeed, getText, getTitle, getValue, goBack, highlight, ignoreAttributesWithoutValue, isAlertPresent, isChecked, isConfirmationPresent, isCookiePresent, isEditable, isElementPresent, isOrdered, isPromptPresent, isSomethingSelected, isTextPresent, isVisible, keyDown, keyDown, keyDownNative, keyPress, keyPress, keyPressNative, keyUp, keyUp, keyUpNative, logToBrowser, metaKeyDown, metaKeyUp, mouseDown, mouseDownAt, mouseDownRight, mouseDownRightAt, mouseMove, mouseMoveAt, mouseOut, mouseOver, mouseUp, mouseUpAt, mouseUpRight, mouseUpRightAt, open, openWindow, refresh, removeAllSelections, removeScript, removeSelection, retrieveLastRemoteControlLogs, runScript, select, selectFrame, selectPopUp, selectWindow, setBrowserLogLevel, setCursorPosition, setMouseSpeed, setSpeed, setTimeout, shiftKeyDown, shiftKeyUp, shutDownSeleniumServer, start, stop, submit, type, typeKeys, uncheck, useXpathLibrary, waitForCondition, waitForCondition, waitForFrameToLoad, waitForFrameToLoad, waitForPageToLoad, waitForPageToLoad, waitForPopUp, windowFocus, windowMaximize
 

Method Detail

isStarted

boolean isStarted()
Indicates if selenium session was already successfully started.

Returns:
true if selenium session was already successfully started; false otherwise

getStyle

<R,T extends CssResolver<R>> R getStyle(ElementLocator<?> elementLocator,
                                        T cssResolver)
Get current style value of element given by locator.

Type Parameters:
R - the returning type (which was resolved by given resolver)
T - the type of resolver CssResolver
Parameters:
elementLocator - of element from what we want to get current style value
cssResolver - CSS style property resolver, see CssResolver
Returns:
current value of property if its element exists and has this property value set; null value otherwise
Throws:
IllegalStateException - if is caught unrecognized throwable

scrollIntoView

void scrollIntoView(ElementLocator<?> elementLocator,
                    boolean alignToTop)
Aligns screen to top (resp. bottom) of element given by locator.

Parameters:
elementLocator - of element which should be screen aligned to
alignToTop - should be top border of screen aligned to top border of element

mouseOverAt

void mouseOverAt(ElementLocator<?> elementLocator,
                 Point point)
Simulates a user hovering a mouse over the specified element at specific coordinates relative to element.

Parameters:
elementLocator - element's locator
point - specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.

mouseOutAt

void mouseOutAt(ElementLocator<?> elementLocator,
                Point point)
Simulates a user hovering a mouse out of the specified element at specific coordinates relative to element.

Parameters:
elementLocator - element's locator
point - specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.

belongsClass

boolean belongsClass(ElementLocator<?> elementLocator,
                     String className)
Checks if element given by locator is member of CSS class given by className.

Parameters:
className - name of CSS class
elementLocator - element's locator
Returns:
true if element given by locator is member of CSS class given by className

isAttributePresent

boolean isAttributePresent(AttributeLocator<?> attributeLocator)
Verifies that the specified attribute is defined for the element.

Parameters:
attributeLocator - an attribute locator
Returns:
true if the element's attribute is present, false otherwise

getCount

int getCount(IterableLocator<?> locator)
Description copied from interface: TypedSelenium
Returns the number of elements that match the specified locator.

Specified by:
getCount in interface TypedSelenium
Returns:
the number of nodes that match the specified locator

check

void check(ElementLocator<?> locator,
           boolean checked)

Check a toggle-button (checkbox/radio) on or off.

Parameters:
locator - an element locator
checked - if true, toggle-button will be checked on, otherwise checked off

doCommand

void doCommand(String command,
               String param1,
               String param2)
Invokes selenium command.

Parameters:
command - the command name from Selenium's JavaScript API
param1 - first parameter
param2 - second parameter

Graphene Selenium: API 2.0.0.Alpha1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.