-
Junior Member
Image In WebTable
Hi frndz
I have a webpage. On which a WebTable is displayed dynamically.
The WebTable have some columns. The last column contains 1 image which is a link.
This link is clicked depending upon the user's input data.
Can anyone tell me how can I get image from webtable and after that click on the image.
-
Moderator
Re: Image In WebTable
I think this simple code should do the trick:
Browser("micClass:=Browser").Page("micClass:=Page").Image("file name:=Name_of_the_Image.Extension").Click
I haven't tried this code as I don't have QTP on this machine, but I will and if I get to it before you do, I will correct it just in case its not working.
-
Moderator
Re: Image In WebTable
Sanket, try this:
strImgVisible=Browser("micClass:=Browser").Page("micClass:=Page").Image("file name:=FileName.Extension").GetROProperty("visible")
If strImgVisible=True Then
Reporter.ReportEvent micPass, "Image Check", "Image Visible"
Browser("micClass:=Browser").Page("micClass:=Page").Image("file name:=FileName.Extension").Highlight
Browser("micClass:=Browser").Page("micClass:=Page").Image("file name:=FileName.Extension").Click
Else
Reporter.ReportEvent micFail, "Image Check", "Image not Visible"
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules