문제

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!

도움이 되었습니까?

해결책

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").

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top