com.appperfect.devcommon.script.webelement
Interface WebObject

All Superinterfaces:
IScript
All Known Subinterfaces:
WebArea, WebBrowserElement, WebButton, WebCheckBox, WebComboBox, WebDivElement, WebEdit, WebFile, WebHiddenField, WebImage, WebInputButton, WebInputElement, WebInputImage, WebLink, WebList, WebListItem, WebPasswordField, WebRadioButton, WebResetButton, WebSpan, WebSubmitButton, WebTable, WebTextArea, WebTextField

public interface WebObject
extends IScript

WebObject represents the generic web or HTML element. WebObject element can be created using createWebObject API of IScriptEngine interface. The return value is an instance of WebObject interface. Once WebObject is created, you can play events mentioned below.


Method Summary
 void addAttribute(java.lang.String sAttributeName, java.lang.String sAttributeValue, boolean bIgnore, boolean bValidate, java.lang.String testParameterName)
 Each Web or Window Element has a set of attributes, which are used to find the desired element during execution This method is used to add a attribute to the event
 boolean click(boolean useLowLevelMouseEvents)
 To simulate click event on html element
 boolean dblClick()
 To simulate double click event on html element
 boolean mouseMove()
 To simulate mouse move event on html element
 boolean rightClick()
 To simulate right click event on html element
 boolean set(java.lang.String text)
 To set the specified text in the element
 void setBreakPoint(boolean bBreakPoint)
 This method should be called to set a breakpoint before executing task.
 void setExactMatchForAttributesComparision(boolean bExactMatch)
 This method should be called to match all the attributes exactly as they are while finding the target element.
 void setIgnored(boolean bIgnore)
 This method should be called to ignore a task during execution.
 void setImagePath(java.lang.String sImagePath)
 This is used to set the event's image path.
 void setThinkTime(int iThinkTime)
 Delay in seconds before the task is actually executed.
 void setTitle(java.lang.String sTitle)
 This method is used to set the event's title
 boolean submit()
 To submit the form
 boolean type(java.lang.String keyBoardInput, boolean isAlphaNumeric)
 Types the specified string in the object
 boolean wait(java.lang.String propertyName, java.lang.String propertyValue, long timeout)
 Will make replayer wait till specified property recieves specified value or till the specified time out period, whatever happens earlier
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setTimeout
 

Method Detail

addAttribute

void addAttribute(java.lang.String sAttributeName,
                  java.lang.String sAttributeValue,
                  boolean bIgnore,
                  boolean bValidate,
                  java.lang.String testParameterName)
Each Web or Window Element has a set of attributes, which are used to find the desired element during execution This method is used to add a attribute to the event

Parameters:
sAttributeName - name of the attribute
sAttributeValue - value of the attribute
bIgnore - true if this attribute should be ignored; false otherwise.
bValidate - true if this attribute should be validated; false otherwise.
testParameterName - name of the TestParameter if the attribute value is parameterized

click

boolean click(boolean useLowLevelMouseEvents)
To simulate click event on html element

Parameters:
useLowLevelMouseEvents - true if application should use low level mouse events to replay, false otherwise
Returns:
true if success, false otherwise

dblClick

boolean dblClick()
To simulate double click event on html element

Returns:
true if success, false otherwise

mouseMove

boolean mouseMove()
To simulate mouse move event on html element

Returns:
true if success, false otherwise

rightClick

boolean rightClick()
To simulate right click event on html element

Returns:
true if success, false otherwise

set

boolean set(java.lang.String text)
To set the specified text in the element

Parameters:
text - text to set in element
Returns:
true if success, false otherwise

setBreakPoint

void setBreakPoint(boolean bBreakPoint)
This method should be called to set a breakpoint before executing task. In case breakpoint is set, test will wait for user's interruption before moving forward.

Parameters:
bBreakPoint - true if breakpoint should be set; false otherwise.

setExactMatchForAttributesComparision

void setExactMatchForAttributesComparision(boolean bExactMatch)
This method should be called to match all the attributes exactly as they are while finding the target element. Else only indexOf is used during comparision of attributes.

Parameters:
bExactMatch - true if all the attributes for the event are to matched exactly as they are; false otherwise.

setIgnored

void setIgnored(boolean bIgnore)
This method should be called to ignore a task during execution.

Specified by:
setIgnored in interface IScript
Parameters:
bIgnore - true if this task should be ignored; false otherwise.

setImagePath

void setImagePath(java.lang.String sImagePath)
This is used to set the event's image path.

Parameters:
sImagePath - file path of the event's image saved on disk.

setThinkTime

void setThinkTime(int iThinkTime)
Delay in seconds before the task is actually executed.

Specified by:
setThinkTime in interface IScript
Parameters:
iThinkTime - no of seconds the engine waits before the task is actually executed.

setTitle

void setTitle(java.lang.String sTitle)
This method is used to set the event's title

Parameters:
sTitle - title of the event

submit

boolean submit()
To submit the form

Returns:
true if success, false otherwise

type

boolean type(java.lang.String keyBoardInput,
             boolean isAlphaNumeric)
Types the specified string in the object

Parameters:
keyBoardInput - A String value. The text string to type.
isAlphaNumeric - is true if text string represents a alphanumeric key, false otherwise
Returns:
true if success, false otherwise

wait

boolean wait(java.lang.String propertyName,
             java.lang.String propertyValue,
             long timeout)
Will make replayer wait till specified property recieves specified value or till the specified time out period, whatever happens earlier

Parameters:
propertyName - name of the element's attribute for which the value should be fetched.
propertyValue - value of the attribute against which the comparision should be done
timeout - in no. of seconds, time period for which the replayer should wait to get the expected value
Returns:
true if event was executed successfully, returns false if there is any failure during execution


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.