QTP 9.5 - Select an element in a table - 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: QTP 9.5 - Select an element in a table (/Thread-QTP-9-5-Select-an-element-in-a-table) |
QTP 9.5 - Select an element in a table - SAKDOSS - 07-29-2009 Hello, I would like to select one precise element in a table (a JTable in fact but I think it's quite similar) and I don't know how to do it. For example, if I have the table : Code: Column 1 | Column 2 How can I select the name in "Column 2" which correspond to the line which contains 'k' in "Column 1" ? Of course this line is not always the second. Thanks in advance ! RE: QTP 9.5 - Select an element in a table - supputuri - 07-30-2009 Hi SAKDOSS , Code: If Browser(X).Page(X).WebTable("index:= Here mention UR table index").Exist Then Please let me know if you need any more info. RE: QTP 9.5 - Select an element in a table - venkatbatchu - 07-30-2009 Please see the attached document and go through the query so that u would feel much comfortable Scenario: When I record the application it is taking same object multiple times like “+” is a grow button then in object repository it is taking multiple times as growbutton_1, growbutton_2, growbutton_3,….. And the same way for the fields (area, assigned to, originator) which is taking as “Select field”, selectfield_1, selectfield_2,…… While running the application as in OR it is having multiple object and able to run successfully when I use the descriptive programming it is not running successfully My observation: While running the application here in the first field it is taking as Area and select the field values and next it has to perform the clicking “+” button and then it has to select the another field from the second field Observed issue: Here it is always selecting the first field value only instead of 2,3,4,….. Could you please share your ideas please let me know if u have any better solution for this Thanks, Venkat.Batchu RE: QTP 9.5 - Select an element in a table - SAKDOSS - 07-30-2009 Thank you very much QTPKing. I'm using a JTable so I modify a little bit your script (I also changed the For loops into While loops). Code: 'String which enable to identify the line RE: QTP 9.5 - Select an element in a table - supputuri - 07-30-2009 that's great SAKDOSS |