Skip to content
Craig
Craig asked on Aug 7, 2009 8:27 PM

Hi,

I am using the following code in QTP10 with TestAdvantage 9.1 CLR2:

searchCrit = SwfWindow("Traffic Volume Information").SwfObject("Search Criteria").GetVisibleText

Each time I execute the code the text that is assigned to searchCrit is different… does anyone know what would cause this or if there is anymore information I can provide to help.

Thanks

Sign In to post a reply

Replies

  • 0
    Dennis
    Dennis answered on Aug 7, 2009 8:27 PM

    Try using "GetROProperty ("Text")" instead of "GetVisibleText".

    I don't know if this explains your issue, but according to the QTP Help, "The GetVisibleText method may behave differently in different run sessions depending on the operating system version you are using, service packs you have installed, other installed toolkits, the APIs used in your application, and so on.  Therefore, when possible, it is highly recommended to use the GetROProperty method or the Object property to retrieve the value of the text (or equivalent) property from an object in your application instead of using the GetVisibleText method."

    I hope this helps.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Craig
Favorites
0
Replies
1
Created On
Aug 07, 2009
Last Post
17 years, 1 month ago

Suggested Discussions

Tags

No tags

Created by

Created on

Aug 7, 2009 8:27 PM

Last activity on

Aug 7, 2009 8:27 PM