Micro Focus QTP (UFT) Forums
Can not find a Button - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Can not find a Button (/Thread-Can-not-find-a-Button)



Can not find a Button - mv8167 - 10-28-2010

Using QTP 9.5

When running my script, I get a second web page window that Opens. I select a link/button/image (first oof 8) and the window closes taking values with to populate the first web screen.

Recording QTP, selecting the link/button/image i get the Click operation, but on Run, the link/button/image is not found. Using Spy, I am told that the 8 link/buttgons are all images. the image has the name of GridView1$ctl02$btnSelect, and image type is Image Button. But Click or Submit operations can not correctly find this button/link/image to select it.

How can I find and select this image?

thx for any advice


RE: Can not find a Button - KVK - 10-29-2010

Hi,

Try the below code's to click the Image,

Code:
Browser("creationtime:=0").Page("micclass:=Page").Image("name:=GridView1.*","image type:=Image Button").FireEvent  "onclick"

(OR)

Code:
Browser("creationtime:=0").Page("micclass:=Page").Image("name:=GridView1.*","image type:=Image Button").Click "1","1",micLeftBtn

(OR)

Code:
Browser("creationtime:=0").Page("micclass:=Page").Image("name:=GridView1.*","image type:=Image Button").Object.Click


If the above code doesnt work, please check if the Image Object Properties are correct.

Thanks,
Vinod


RE: Can not find a Button - mv8167 - 10-29-2010

Thx ;-) I will try these. Thank youuuu


RE: Can not find a Button - mv8167 - 11-20-2010

Ahhh, nope no luck.

Tx for trying though. ;-)