Geeks Talk

Prepare for your Next Interview




Image In WebTable

This is a discussion on Image In WebTable within the QTP forums, part of the Software Testing category; 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 ...


Go Back   Geeks Talk > Software Testing > QTP

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 01-28-2008
Junior Member
 
Join Date: Jan 2008
Location: Mumbai
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
sanket172 is on a distinguished road
Question 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.
Reply With Quote
The Following User Says Thank You to sanket172 For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 02-01-2008
Moderator
 
Join Date: Oct 2007
Location: Frankfort, KY
Posts: 283
Thanks: 3
Thanked 51 Times in 36 Posts
Anshoo_Arora is on a distinguished road
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.
Reply With Quote
  #3 (permalink)  
Old 02-02-2008
Moderator
 
Join Date: Oct 2007
Location: Frankfort, KY
Posts: 283
Thanks: 3
Thanked 51 Times in 36 Posts
Anshoo_Arora is on a distinguished road
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
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Webtable object identification on webpage manabh QTP 9 4 Weeks Ago 07:28 AM
Image Comparer JobHelper Geeks Lounge 0 10-11-2007 08:37 AM
image conversion tool JobHelper Geeks Lounge 0 06-19-2007 09:10 AM
Image resize out of Proportion gansmore PHP 0 04-12-2007 08:22 AM
How do one upload image? jamesravid Suggestions & Feedback 11 12-11-2006 09:11 AM


All times are GMT -4. The time now is 09:11 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved