Ajocado API 1.0.0.Alpha2

org.jboss.arquillian.ajocado.framework
Interface ExtendedTypedSelenium

All Superinterfaces:
TypedSelenium
All Known Subinterfaces:
AjaxSelenium

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.
 void enableNetworkTrafficCapturing(boolean networkTrafficCapturingEnabled)
           Configures if the network traffic should be recorded for Selenium session.
 int getCount(IterableLocator<?> locator)
          Returns the number of elements that match the specified locator.
 String getStyle(ElementLocator<?> elementLocator, CssProperty property)
          Get current style value of element given by locator.
 String getStyle(ElementLocator<?> elementLocator, String property)
          Deprecated. 
 boolean isAttributePresent(AttributeLocator<?> attributeLocator)
          Verifies that the specified attribute is defined for the element.
 boolean isDisplayed(ElementLocator<?> elementLocator)
          Returns whether the element is displayed on the page.
 boolean isNetworkTrafficCapturingEnabled()
          Returns whether the network traffic should be recorded or not
 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, dragdrop, fireEvent, focus, getAlert, getAllCookies, 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, keyDownNative, keyPress, keyPressNative, keyUp, keyUpNative, logToBrowser, metaKeyDown, metaKeyUp, mouseDown, mouseDownAt, mouseDownRight, mouseDownRightAt, mouseMove, mouseMoveAt, mouseOut, mouseOver, mouseUp, mouseUpAt, mouseUpRight, mouseUpRightAt, open, refresh, removeAllSelections, removeScript, removeSelection, retrieveLastRemoteControlLogs, runScript, select, selectFrame, setBrowserLogLevel, setCursorPosition, setMouseSpeed, setSpeed, setTimeout, shiftKeyDown, shiftKeyUp, shutDownSeleniumServer, start, stop, submit, type, typeKeys, uncheck, useXpathLibrary, waitForCondition, waitForCondition, waitForFrameToLoad, waitForFrameToLoad, waitForPageToLoad, waitForPageToLoad, 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

enableNetworkTrafficCapturing

void enableNetworkTrafficCapturing(boolean networkTrafficCapturingEnabled)

Configures if the network traffic should be recorded for Selenium session.

Have to be configured before the start of the Selenium session.

Parameters:
networkTrafficCapturingEnabled - whether the network traffic should be recorded or not

isNetworkTrafficCapturingEnabled

boolean isNetworkTrafficCapturingEnabled()
Returns whether the network traffic should be recorded or not

Returns:
whether the network traffic should be recorded or not

getStyle

@Deprecated
String getStyle(ElementLocator<?> elementLocator,
                           String property)
Deprecated. 

Get current style value of element given by locator. Use CSS style notation instead of JavaScript's camel notation! This methods of getting current style value haven't absolute browser compatibility. E.g.: use property "background-color" instead of "backgroundColor"

Parameters:
elementLocator - of element from what we want to get current style value
property - CSS style property what we can to recognize
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

getStyle

String getStyle(ElementLocator<?> elementLocator,
                CssProperty property)
Get current style value of element given by locator.

Parameters:
elementLocator - of element from what we want to get current style value
property - CSS style property
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.

isDisplayed

boolean isDisplayed(ElementLocator<?> elementLocator)
Returns whether the element is displayed on the page.

Parameters:
elementLocator - element locator
Returns:
if style contains "display: none;" returns false, else returns true

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

Ajocado API 1.0.0.Alpha2

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.