Results 1 to 3 of 3

Thread: Image In WebTable

  1. #1
    Junior Member
    Join Date
    Jan 2008
    Answers
    1

    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.


  2. #2

    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.


  3. #3

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact