RFT-how to get the title of the webpage in RFT

417 views Asked by At

I am currently trying to automate a web application using RFT.The web application is written in Java.

My test case,the moment,I navigate to a particular page,I want to get the title of the webpage

example:- you go to www.google.com and then click on 'News'. The page title is "Google News".

I want to get this title.

Like in Selenium,I am aware that getTitle() used to give me the Title of the page

Please help!

Thanks!

2

There are 2 answers

0
Prakash On BEST ANSWER

getting the tile depends on what type of application it is( I mean if its Html/Win/.Net/Java etc) and what is the type of object you have in the object map for it. To get any information you are looking for you can use the TestObjectInspector in RFT. Using TestobjectInspector(and setting it to "Show Properties" ) you can check which property is the one that shows the title and then on that object you can call getProperty("propertyName"); For Java application (as you mentioned your application is based on) you might use .captionText or if you have htmlbrowser in the object map you can find the htmldocument (htmlbrowser's child) and then call getProperty(".title").

0
Cagin Uludamar On

you can use yourDocumentObject().getProperty("title"). Use Recorder window to select and insert the document object.