Sunday, May 24, 2009

Script for Highlighting the Objects

Hi All,

Hope most of you people might be knowing how to highlight an Object in Object Repository using "Highlight in Application" button.
Here i am providing a way of Highlighting the Objects of specific Class programmatically(thru script).

' script :
systemutil.Run "http://www.qtpking.blogspot.com/"
Dim obj Set obj=Description.Create
obj("micclass").value="Link"
Set x=browser("QTP for you ...").Page("QTP for you ...").ChildObjects(obj)
For i=0 to x.count-1
x(i).highlight
Next


'Note: Add 'Page' object into Obj.Repo. before execution
Just execute the above script & watch the output.....:)

2 comments:

  1. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post.

    Bry
    www.gofastek.com

    ReplyDelete
  2. First time I commented in a blog! I really enjoy it. You have an awesome post. Please do more articles like this. I'm gonna come back surely. God bless.

    Rica
    www.imarksweb.org

    ReplyDelete