![]()
API Guide - Table Row |
Courses in c#, ruby, shell scripting, Software testing courses and more
|
|||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| Class | WET::WebTableRow |
| In: |
WebTableRow.rb
|
| Parent: | WebContainer |
Class to represent a single row insude a HTML Table.A Row is a full blown container.You could use the various methods to create Web objects just as you would use a browser or Frame.For example you could say:
Browser(...).Table(...).Row(...).Image(...)
Check the *WebContainer*document for details about the container methods.
| wait | -> | waitForIE |
Constructor - Scripts should not directly create instances of Rows.Instead you should use the WebTable.Row(*args) method provided by Web Tables.
The parameters used to identify a row are
text - text displayed on the row index
Check to see if the row actually exists on the page.If the row actually does exist,then prints out a success message in the test report.If it doesn’t exist,then it prints out a failure in the report. One example of using this check is immediately after performing ‘add’operaions. For example,after adding a new user,you may want to check that the user link actually does exist.
Check to see if the row *does not*exist on the page.If the row does not exist,then prints out a success message in the test report.If it actually does exist,then it prints out a failure in the report. One example of using this check is immediately after performing ‘delete’ operations. For example,after deleting user ‘abc’,you may want to check that the user link for ‘abc’has been deleted.
Check to see if the expected text matches the text of the table row.If the row's text matches the search_text,
then a success message is printed in the test report.Otherwise,a failure is printed out in the reported.
Check to see if the expected text does not match the text of the row.If the check is successful,that is,the row’s text does not match the expected text,then a success is printed in the test report.If the check fails,then a failure is printed in the test report.
Find a Button with the specified properties, The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The common properties used to identify a button are :
Find a Web checkbox with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The properties used to identify a checkfield are:
displayed to the left of the checkbox.
Find a Web File with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The properties used to identify a File are:
text displayed to the left of the file.
Find an IFrame with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The properties used to identify a Textarea are:
Find an Image with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The common properties for an image are
Get a web Link with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
For a link the following are the commonly used properties:
Find a Web List with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The properties used to identify a List are:
displayed to the left of the weblist
Find a Web radio button with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The properties used to identify a radio button are:
label is considered to be the textimmediately after the radio.
Find a HTML Table with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The properties with which a table can be identified are:
info that is available about a table is the text contained in the table. The table's text is the aggregate of the contents of the cells of the table.
Find a Web textfield with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The properties used to identify a textfield are:
displayed to the left of the textfield.
Find a Textarea with the specified properties. The properties are specified as name-value pairs using the syntax:
"property_name:=value"
The value can either be a string literal or a string representing a regular expression. To emulate a regular expressioin, the value starts and ends with the ’/’ character. For example, "name:=/some.*/"
The properties used to identify a Textarea are:
Get an element based on the tagname. This is useful for those cases where there is no predefined WET class for a particular tag but a scripter needs to use it.
For example if you want to get a <div> element whose id is ‘myId’, then you can say
element_by_tag_name("div", "id" => "myId")
Check to see if the object exists or not at runtime.
Returns true if the object exists, false if it doesn’t
| WET is a opensource automated web testing tool which uses Watir as the library to drive web pages. WET drives an IE Browser directly and so the automated testing done using WET is equivalent to how a user would drive the web pages. WET extends the scripting abilities of Watir and also offers the convenience of recorders. It is licensed under LGPL and BSD style open source licenses. |