Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WebElement and WebTable problem
#1
Solved: 11 Years, 4 Months ago
Hi,
I am using QTP to click on a row in an IE-browser on a website that has a webtable with rows and columns.
But QTP sees only the WebElement and not the WebTable.
So i can not search the rows or the columns.
And if i try to find a particular WebElement/cell, QTP says the object is not found.
I would expect something like ..WebTable().WebElement(), but instead QTP sees only the WebElement.
Can someone help me so QTP sees the Table object and i can search in the table.

Code:
Browser("Connect").Page("Connect 2").WebElement("WebTable").Click
Reply
#2
Solved: 11 Years, 4 Months ago
See if this thread can help you.
https://www.learnqtp.com/forums/Thread-R...WebElement
Reply
#3
Solved: 11 Years, 4 Months ago
Thanks sasmitakumari,

The thread helped me out indeed. It talked about getting the webtable object into the repository.
I also found a workaround: make a normal checkpoint (while recording, press insert, checkpoint)
click on a cell/column in the webtable for the checkpoint.
Use the Parameter checkmark in the OR to search for whatever cell-information you want to search and click on that cell.

Code:
Browser("Connect").Page("Connect 2").WebElement("WebTable_4").Check CheckPoint("WebTable")
Browser("Connect").Page("Connect 2").WebElement("WebTable_5").Click

But i like the option to add the webtable object in the OR best.
Reply
#4
Solved: 11 Years, 4 Months ago
while you spy, is it not highlight the area which is a webtable?
Reply
#5
Solved: 11 Years, 4 Months ago
Yes, i can see with object spy what is the webtable, but the webpage is programmed in such a way that the webtable consists of all seperate element/cells, so in qtp I only can look at the cell-level and do not see the webtable object.
Reply
#6
Solved: 11 Years, 4 Months ago
Hi dutchyes ,

Try to add required web table in OR,then use the below code to get the row with particular text.

Code:
intRowNum=Browser("").Page("").Frame("").WebTable("").GetRowWithCellText(text)
Reply
#7
Solved: 11 Years, 4 Months ago
A Spy shot should help all. Please attach.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#8
Solved: 11 Years, 4 Months ago
Hi all,
i did find 2 solutions: with adding the webtable in OR and with a checkpoint.
Thanks all for the input.
So for me this threat can be closed.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation WebElement("WebElement").Click is not working sia sharma 7 23,960 09-28-2016, 08:58 PM
Last Post: supputuri
  QTP not selecting appropriate webelement from the webtable..Need Solution satishkumarm 11 21,645 03-23-2016, 12:47 PM
Last Post: Swetha_Bayya
  Reading Dynamic webtable-WebElement ibmexpert 12 15,471 02-25-2010, 01:43 PM
Last Post: Saket

Forum Jump:


Users browsing this thread: 1 Guest(s)