WebElement and WebTable problem - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: WebElement and WebTable problem (/Thread-WebElement-and-WebTable-problem) |
WebElement and WebTable problem - dutchyes - 07-08-2010 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 RE: WebElement and WebTable problem - sasmitakumari - 07-09-2010 See if this thread can help you. https://www.learnqtp.com/forums/Thread-Reading-Dynamic-webtable-WebElement RE: WebElement and WebTable problem - dutchyes - 07-09-2010 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") But i like the option to add the webtable object in the OR best. RE: WebElement and WebTable problem - sasmitakumari - 07-09-2010 while you spy, is it not highlight the area which is a webtable? RE: WebElement and WebTable problem - dutchyes - 07-09-2010 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. RE: WebElement and WebTable problem - Arun Prakash - 07-10-2010 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) RE: WebElement and WebTable problem - basanth27 - 07-12-2010 A Spy shot should help all. Please attach. RE: WebElement and WebTable problem - dutchyes - 07-12-2010 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. |