|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IHTTPScript
A request object which can be executed by
IScriptEngine.execute(request)
method.
An object of this class is created using createGetRequest
or
createPostRequest
method of IScriptEngine. Once the object is
created, it should be populated as per the requirements of the HTTP protocol
and then executed using IScriptEngine.
Method Summary | |
---|---|
boolean |
assertBrokenLinks(java.lang.String description)
Once the IHTTPScript task is executed, the response page can be validated for broken links using this method |
boolean |
assertFormCount(java.lang.String description,
int count)
Once the task is executed, no of forms in the response can be validated using this method |
boolean |
assertImage(java.lang.String description,
java.lang.String nodePath,
java.lang.String recordedImagePath)
Once the task is executed, text of the node in the DOM tree of the response data can be validated. |
boolean |
assertImageCount(java.lang.String description,
int count)
Once the task is executed, no of images in the response can be validated using this method |
boolean |
assertInDatabase(java.lang.String description,
java.lang.String databaseId,
java.lang.String query)
Once the task is executed, database can be validated by firing the specified SELECT query |
boolean |
assertInputElementCount(java.lang.String description,
int count)
Once the task is executed, no of input elements in the response can be validated using this method |
boolean |
assertLinkCount(java.lang.String description,
int count)
Once the task is executed, no of links in the response can be validated using this method |
boolean |
assertNodeAttributeValue(java.lang.String description,
java.lang.String nodePath,
java.lang.String attributeName,
java.lang.String attributeValue)
Once the task is executed, attributes of the node in the DOM tree of the response data can be validated. |
boolean |
assertNodeText(java.lang.String description,
java.lang.String nodePath,
java.lang.String text)
Once the task is executed, text of the node in the DOM tree of the response data can be validated. |
boolean |
assertPage(java.lang.String description)
Once the IHTTPScript task is executed, the response page can be validated using this method |
boolean |
assertPageSize(java.lang.String description,
long sizeInBytes)
Once the task is executed, size of the response can be validated using this method |
boolean |
assertPageText(java.lang.String description)
Once the IHTTPScript task is executed, the response page can be validated using this method |
boolean |
assertText(java.lang.String description,
java.lang.String[] txt,
boolean bCaseSensitive,
boolean contains,
boolean bAll,
boolean checkForExistance,
boolean regularExpression)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search |
boolean |
assertText(java.lang.String description,
java.lang.String[] txt,
boolean bCaseSensitive,
boolean contains,
boolean bAll,
boolean checkForExistance,
boolean regularExpression,
java.lang.String prefix,
java.lang.String suffix)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search |
boolean |
assertText(java.lang.String description,
java.lang.String txt,
boolean bCaseSensitive)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search |
boolean |
assertText(java.lang.String description,
java.lang.String txt,
boolean bCaseSensitive,
boolean checkForExistance,
boolean regularExpression)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search |
boolean |
assertText(java.lang.String description,
java.lang.String txt,
boolean bCaseSensitive,
boolean checkForExistance,
boolean regularExpression,
java.lang.String prefix,
java.lang.String suffix)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search |
boolean |
assertTodaysDate(java.lang.String description,
java.lang.String dateFormat)
Once the task is executed, response can be validated to contain today's date in specified format |
boolean |
assertTodaysDate(java.lang.String description,
java.lang.String dateFormat,
java.lang.String prefix,
java.lang.String suffix)
Once the task is executed, response can be validated to contain today's date in specified format |
java.lang.String |
getResponse()
After task execution the response page can be fetched using this method |
int |
getResponseCode()
Get Response Code as a result of task execution |
long |
getResponseSize()
After task execution the size of response can be fetched using this method |
long |
getResponseTime()
Get the response time of executed task |
IValidationResult |
getValidationResult()
Once the task is executed, detailed validation result can be fetched using this method. |
HtmlPage |
getWebResponse()
After task execution the response page can be fetched using this method |
boolean |
isValidationSuccessful()
Once the task is executed, this method returns the status of the validation carried out |
void |
setValidationSuccessful(boolean success)
Once the task is executed, this method can be used to set the status of validation |
Methods inherited from interface com.appperfect.devcommon.script.IScript |
---|
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setIgnored, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setThinkTime, setTimeout |
Method Detail |
---|
boolean assertBrokenLinks(java.lang.String description)
description
- of validation
true
if there are no broken links on the
page; false
otherwiseboolean assertFormCount(java.lang.String description, int count)
description
- of validationcount
- expected no of forms in the response
true
if the number of forms matches
count
; false
otherwiseboolean assertImage(java.lang.String description, java.lang.String nodePath, java.lang.String recordedImagePath)
description
- of validationnodePath
- path of the node in the DOM tree of the response datarecordedImagePath
- recorded image path
true
if the response matches this validation;
false
otherwiseboolean assertImageCount(java.lang.String description, int count)
description
- of validationcount
- expected no of images in the response
true
if the number of images matches
count
; false
otherwiseboolean assertInDatabase(java.lang.String description, java.lang.String databaseId, java.lang.String query)
description
- of validationdatabaseId
- database id configured with the application in Tools->Optionsquery
- SQL query to be fired to the given database id
true
if the query return non-empty ResultSet;
false
otherwiseboolean assertInputElementCount(java.lang.String description, int count)
description
- of validationcount
- expected no of input elements in the response
true
if the number of input elements matches
count
; false
otherwiseboolean assertLinkCount(java.lang.String description, int count)
description
- of validationcount
- expected no of links in the response
true
if the number of links matches
count
; false
otherwiseboolean assertNodeAttributeValue(java.lang.String description, java.lang.String nodePath, java.lang.String attributeName, java.lang.String attributeValue)
description
- of validationnodePath
- path of the node in the DOM tree of the response dataattributeName
- name of the attributeattributeValue
- value of the attribute
true
if the response matches this validation;
false
otherwiseboolean assertNodeText(java.lang.String description, java.lang.String nodePath, java.lang.String text)
description
- of validationnodePath
- path of the node in the DOM tree of the response datatext
- visible text of the node
true
if the response matches this validation;
false
otherwiseboolean assertPage(java.lang.String description)
description
- of validation
true
if the response matches with the recorded
page; false
otherwiseboolean assertPageSize(java.lang.String description, long sizeInBytes)
description
- of validationsizeInBytes
- expected size of the response in bytes
true
if the size of response matches
sizeInBytes
; false
otherwiseboolean assertPageText(java.lang.String description)
description
- of validation
true
if the response matches with the recorded
page; false
otherwiseboolean assertText(java.lang.String description, java.lang.String[] txt, boolean bCaseSensitive, boolean contains, boolean bAll, boolean checkForExistance, boolean regularExpression)
description
- of validationtxt
- list of text to look for in the responsebCaseSensitive
- true
if search should be case-sensitive;
false
otherwisecontains
- true
if search for existence of the text;
false
otherwisebAll
- true
if search for all the elements of the
list; false
for any element of the listregularExpression
- true
if text is a regular expression;
false
otherwise
true
if the response matches this validation;
false
otherwiseboolean assertText(java.lang.String description, java.lang.String[] txt, boolean bCaseSensitive, boolean contains, boolean bAll, boolean checkForExistance, boolean regularExpression, java.lang.String prefix, java.lang.String suffix)
description
- of validationtxt
- list of text to look for in the responsebCaseSensitive
- true
if search should be case-sensitive;
false
otherwisecontains
- true
if search for existence of the text;
false
otherwisebAll
- true
if search for all the elements of the
list; false
for any element of the listregularExpression
- true
if text is a regular expression;
false
otherwiseprefix
- text present before the txt
suffix
- text present after the txt
true
if the response matches this validation;
false
otherwiseboolean assertText(java.lang.String description, java.lang.String txt, boolean bCaseSensitive)
description
- of validationtxt
- text to look for in the responsebCaseSensitive
- true
if search should be case-sensitive;
false
otherwise
true
if the response matches this validation;
false
otherwiseboolean assertText(java.lang.String description, java.lang.String txt, boolean bCaseSensitive, boolean checkForExistance, boolean regularExpression)
description
- of validationtxt
- text to look for in the responsebCaseSensitive
- true
if search should be case-sensitive;
false
otherwisecheckForExistance
- true
if search for existence of the text;
false
otherwiseregularExpression
- true
if text is a regular expression;
false
otherwise
true
if the response matches this validation;
false
otherwiseboolean assertText(java.lang.String description, java.lang.String txt, boolean bCaseSensitive, boolean checkForExistance, boolean regularExpression, java.lang.String prefix, java.lang.String suffix)
description
- of validationtxt
- text to look for in the responsebCaseSensitive
- true
if search should be case-sensitive;
false
otherwisecheckForExistance
- true
if search for existence of the text;
false
otherwiseregularExpression
- true
if text is a regular expression;
false
otherwiseprefix
- text present before the txt
suffix
- text present after the txt
true
if the response matches this validation;
false
otherwiseboolean assertTodaysDate(java.lang.String description, java.lang.String dateFormat)
description
- of validationdateFormat
- valid date format
true
if the response matches this validation;
false
otherwiseboolean assertTodaysDate(java.lang.String description, java.lang.String dateFormat, java.lang.String prefix, java.lang.String suffix)
description
- of validationdateFormat
- valid date formatprefix
- text present before the date
suffix
- text present after the date
true
if the response matches this validation;
false
otherwisejava.lang.String getResponse()
int getResponseCode()
long getResponseSize()
long getResponseTime()
IValidationResult getValidationResult()
HtmlPage getWebResponse()
boolean isValidationSuccessful()
true
if the validation was successful;
false
otherwisevoid setValidationSuccessful(boolean success)
success
- true
if the validation is successful;
false
otherwise
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |