How to get current browser in RFT test script

451 views Asked by At

I have my webpage opened using RFT. In that page, I have a link I want to click. For that I am using

objMap.ClickTabLink(objMap.document_eBenefitsHome(), "Upload Documentation", "Upload Documentation");

The current page link name is "Upload Documentation"

I know that objMap.document_eBenefitsHome() takes it back to the initial page, what can I use in that place which uses the "current page opened" ?

Many thanks in advance.

1

There are 1 answers

0
riccardo.cardin On

There are some alternatives that could solve your problem:

  • Open the Test Object Map; select from the map the object that represents the document document_eBenefitsHome; modify the .url property using regular expression, so that the URLs of the two pages you cited in your question match the regex.

  • Find dinamically the document object using the find method. Once the page containing the link you want to click was fully loaded, try to use this code to find the document: find(atDescendant(".class", "Html.HtmlDocument"), false). The false boolean value allow the find method to search also among object that are not previously recorded.