Question & Answer
Question
How can you create a resilient IBM® Rational® Robot GUI script that will make a selection on an HTML link, when the text within the link is dynamic?
Cause
Selecting an HTML Robot link that has dynamic text poses challenges as parts of the recognition properties of the object being tested are changing.
Answer
If you know where on the page the link text is the following script will help you get the recognition strings for all links on the page. If you know which link you want to select then the capture recognition string can be added to an html click statement to select the link. The script below demonstrates this against the "htmltryit" sample application that comes with Rational products. All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Note: If you cut and paste this script into Robot please make sure that line overruns are corrected within the script before running it.
|
Historical Number
21004
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21133803