com.appperfect.devcommon.script.webelement
Interface IUrl

All Superinterfaces:
IHTTPScript, IScript

public interface IUrl
extends IHTTPScript

A IUrl object which can be executed by IScriptEngine.executeURL(url) method.

An object of this class is created using createURL method of IScriptEngine. Once the object is created, all its properties should be initialized to proper values and then executed using IScriptEngine.

See Also:
IScriptEngine, IScriptEngine.createURL(int, String, String, int, String, boolean), IScriptEngine.executeURL(IUrl)

Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
 A URL can have many request parameters.
 boolean assertElementsPositionInPage(java.lang.String description, int tolerancePercent, int failedCountLimit, boolean limitInPercent)
 Once the URL is executed, position of elements in the page can be validated using this method.
 boolean assertElementsSizeInPage(java.lang.String description, int tolerancePercent, int failedCountLimit, boolean limitInPercent)
 Once the URL is executed, size (Height/Width) of elements in the page can be validated using this method.
 void setBenchmarkFile(java.lang.String sFileName)
 This is helpful for validation purpose to match the replayed response with the recorded one.
 void setBreakPoint(boolean bBreakPoint)
 This method should be called to set a breakpoint before executing task.
 void setFireURL(boolean bFireURL)
 This method should be called in case url is to be fired explicitly.
 void setIgnoreParam(boolean bIgnore)
 This method should be called in case URL parameters comparison should be ignored during execution.
 void setImagePath(java.lang.String sImagePath)
 This is used to set the url page image path.
 void setRenderFilePath(java.lang.String sRenderFilePath)
 This is used to set the page rendering path, used for rendering validation.
 void setTitle(java.lang.String sTitle)
 This method is used to set the url's title
 void waitForText(java.lang.String text)
 If text to wait is set then application waits for the specified "text" in the response before executing the next task.
 
Methods inherited from interface com.appperfect.devcommon.script.web.IHTTPScript
assertBrokenLinks, assertFormCount, assertImage, assertImageCount, assertInDatabase, assertInputElementCount, assertLinkCount, assertNodeAttributeValue, assertNodeText, assertPage, assertPageSize, assertPageText, assertText, assertText, assertText, assertText, assertText, assertTodaysDate, assertTodaysDate, getResponse, getResponseCode, getResponseSize, getResponseTime, getValidationResult, getWebResponse, isValidationSuccessful, setValidationSuccessful
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setIgnored, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setThinkTime, setTimeout
 

Method Detail

addParameter

void addParameter(java.lang.String name,
                  java.lang.String value)
A URL can have many request parameters. Each GET parameter needs to be added using this method. A parameter added with this method is appended to the URL when the URL is fired explicitly.

Parameters:
name - name of the request parameter
value - value of the request parameter

assertElementsPositionInPage

boolean assertElementsPositionInPage(java.lang.String description,
                                     int tolerancePercent,
                                     int failedCountLimit,
                                     boolean limitInPercent)
Once the URL is executed, position of elements in the page can be validated using this method. This is helpful in finding if page is rendering fine in the browser.

Parameters:
description - of validation
tolerancePercent - refers to the % margin of error which is allowed while calculating the difference in recorded and replayed positions.
failedCountLimit - least number of elements in page which should be displaced before reporting the error for page
limitInPercent - true if failedCountLimit represents %, false if it represents number.
Returns:
true if success, false otherwise

assertElementsSizeInPage

boolean assertElementsSizeInPage(java.lang.String description,
                                 int tolerancePercent,
                                 int failedCountLimit,
                                 boolean limitInPercent)
Once the URL is executed, size (Height/Width) of elements in the page can be validated using this method. This is helpful in finding if page is rendering fine in the browser.

Parameters:
description - of validation
tolerancePercent - refers to the % margin of error which is allowed while calculating the difference in recorded and replayed size.
failedCountLimit - least number of elements in page whose size should change before reporting the error for page
limitInPercent - true if failedCountLimit represents %, false if it represents number.
Returns:
true if success, false otherwise

setBenchmarkFile

void setBenchmarkFile(java.lang.String sFileName)
This is helpful for validation purpose to match the replayed response with the recorded one.

Parameters:
sFileName - file path of the response when this task was recorded.

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.

setFireURL

void setFireURL(boolean bFireURL)
This method should be called in case url is to be fired explicitly.

Parameters:
bFireURL - true if url should be fired explicitly; false otherwise.

setIgnoreParam

void setIgnoreParam(boolean bIgnore)
This method should be called in case URL parameters comparison should be ignored during execution.

Parameters:
bIgnore - true if the parameters comparison should be ignored; false otherwise.

setImagePath

void setImagePath(java.lang.String sImagePath)
This is used to set the url page image path.

Parameters:
sImagePath - file path of the url page image saved on disk.

setRenderFilePath

void setRenderFilePath(java.lang.String sRenderFilePath)
This is used to set the page rendering path, used for rendering validation.

Parameters:
sRenderFilePath - file path of the page render data saved on disk.

setTitle

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

Parameters:
sTitle - title of the event

waitForText

void waitForText(java.lang.String text)
If text to wait is set then application waits for the specified "text" in the response before executing the next task. Application waits till timeout period is over or till the specified text is found, whichever is earlier. This api is mainly useful for AJAX applications, where ajax requests takes time to execute and you want application to wait till some particular text is found in response.

Parameters:
text - text in the response for which application should wait before fetching response.


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