Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get a specific image inside a webtable
#1
Not Solved
Hi,
I'm having a problem getting a specific image inside a dynamic webtable.

There are 6 Columns and 21 Rows in the webtable.
In the 1st column, there are 1 checkbox and 3 images.
I want to get the 1st image on that column.
Can you help me how to retrieve the image.

Thanks
Reply
#2
Not Solved
Hi,

U can use Browser().Page().webtable().childItem()
Specify the class and index for the image with cell address.

Let me know in case u need any further help.

Regards,
Sankalp
Reply
#3
Not Solved
Thanks sir Sankalp,
Can you fill the question mark for the childItem parameters.
in page().webtable().childItem(2,2,"Image",0)
2 - ?
2 - ?
Image - class
0 - ?

Thanks
Reply
#4
Not Solved
Please find answers for your question

2 - Row no
2 - Col no
Image - class
0 - Index no
Reply
#5
Not Solved
Thanks! Smile
Reply
#6
Not Solved
Hi,
I have another problem, when I used childItem and childItemCount, I encountered "Object required".
Below is my code:

Code:
rWebBox = Browser("micclass:=Browser").Page("micclass:=Page").WebTable("micclass:=WebTable", "name:=checkAll").RowCount

For i=1 to rWebBox
    cWebBox = Browser("micclass:=Browser").Page("micclass:=Page").WebTable("micclass:=WebTable", "name:=checkAll").childItemCount(i,1, "Image")
        For j=0 to cWebBox
            Set iWebBox = Browser("micclass:=Browser").Page("micclass:=Page").WebTable("micclass:=WebTable", "name:=checkAll").childItem(i,1, "Image", cWebBox)
                roWebBox = iWebBox.getROProperty("alt")
        Next
Next

Below is the code which QTP says "Object Required":
Code:
Set iWebBox = Browser("micclass:=Browser").Page("micclass:=Page").WebTable("micclass:=WebTable", "name:=checkAll").childItem(i,1, "Image", cWebBox)

Can you help me to solve this.

Thanks, Smile
Reply
#7
Not Solved
Image may not be available in 0th Row with 1st Column. Can you check it once from which row and which column Images are available in webtable.
Reply
#8
Not Solved
Thanks,
My counter for Index for childItem was the one making the error.
It must be like this instead of the code above:
Code:
Set iWebBox = Browser("micclass:=Browser").Page("micclass:=Page").WebTable("micclass:=WebTable", "name:=checkAll").childItem(i,1, "Image", j)

Thanks again. Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Read Content inside PDF kotaramamohana 0 1,221 09-02-2020, 05:49 PM
Last Post: kotaramamohana
Question Find specific records in a SwfTreeView on different node levels lotos 0 2,433 10-06-2017, 05:14 AM
Last Post: lotos
  Link in a webtable in a webtable Soulwalker 1 2,862 07-19-2017, 01:44 PM
Last Post: Ankur
  Click on calender on specific date. venkatesh9032 1 3,953 12-02-2015, 07:30 PM
Last Post: nistalaramesh
  Fetching total number of records inside a webtable vidya2k2 2 3,960 06-15-2015, 02:55 PM
Last Post: venkatesh9032

Forum Jump:


Users browsing this thread: 1 Guest(s)