Version 1.1.0
Here's the list of all WebAccept tasks and how to use them.
Task | Description |
---|---|
assert | Validates that the response is valid |
echo | Echo text to the console |
form | Post or get an HTML form |
get | Loads the resulting page of a GET command to a web server |
post | Loads the resulting page of a POST command to a web server |
read | Reads the value of a node in a HTML to a property |
This task is used just like NUnit Assert. It is used to make sure the returned page from your request contains was want you expected.
Name | Description | Required |
---|---|---|
hasnottext | The test fail if this text is found in the page | false |
hastext | The test pass if this text is found in the page | false |
isquickerthan | The test pass if the page is loaded in less than the milliseconde specified | false |
matchregex | The test pass if the regular expression can find a match in the page | false |
message | The message to return in case of failure | false |
test | The test pass if this .NET expression is evaluated to true. This must be a valid VB.NET expression. | false |
Here's a test that search for WebAccept with Google and fail if no result are returned.
Use this tasks to request a web page using PORT method. With this task you can simulate entry into a web form.
Name | Description | Required |
---|---|---|
param | A parameter to be posted to the form | true |
name | Name of the parameter | true |
value | Value of the parameter | true |
url | URL to the web form | true |
Here's a test that post my name and e-mail to a php.
This task echo text to the console. It is usefull for debugging your tests.
Name | Description | Required |
---|---|---|
text | The text to output | true |
Here's a test that output Some text to the console.
With this tasks you can retrieve values into web page using XPath expression and store it in a global parameter usable with ${parametername} in your tests.
Name | Description | Required |
---|---|---|
into | Name of the property to read the node into | true |
xpath | XPath expression to the node to get the result from | true |
Here's a test that retrieve the title of the page into the title parameter:
Use this tasks to request a web page using GET method. GET request can be specified direcly in the URL like http://host.com/page.asp?param1=something
Name | Description | Required |
---|---|---|
url | URL to the web page | true |
Here's a test that search for WebAccept with Google.
This task replace the get and post tasks. It can be helpfull with test driven developement because when you've finish writing this task you can simply copy-paste it into your HTML page. Also it should be more easy to use for web developpers since it uses the same syntax as HTML forms.
Name | Description | Required |
---|---|---|
input | All the fields in your form, including one submit | true |
Here's a test that output Some text to the console.