![]() |
How to open html file and update values in particular cell of a table in QTP? - 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: How to open html file and update values in particular cell of a table in QTP? (/Thread-How-to-open-html-file-and-update-values-in-particular-cell-of-a-table-in-QTP) |
How to open html file and update values in particular cell of a table in QTP? - yogesh kancherla - 10-08-2012 Hi All, I am new to QTP. I am writing code to generate report in html format. I have created table struture and everything. Now after all my scenarios are executed i want to open the file again and update values in cells of a table. Suppose i have 10 rows and 2 columns in a table. now i have opened file and want to go to 3 row 2nd column of a table...help me with this. sample code will be much helpful. RE: How to open html file and update values in particular cell of a table in QTP? - harishshenoy - 10-11-2012 Open the file in the edit mode by using '8'. then u can add the lines to it. try the below sample code: Code: Set objFS = CreateObject("Scripting.FileSystemObject") Thanks. Harish RE: How to open html file and update values in particular cell of a table in QTP? - yogesh kancherla - 10-11-2012 Thanks a lot harish. got some idea. one query, in our result report which is html file, if i have 3 tables and now i open the file with append mode(which u said) the cursor will be at the end of the last line of the last table right!.. then if i want to update value in second table how to move cursor to second table..can we assign id's to tables and its elements while creating itself? If yes can u give me some sample code to give id's to table, coulmn,row Thanks for your input. it helped me a lot. One query, In my html file i have 3 tables, if i open html file in append mode then the cursor will be at the end of the last line of last table. how to update values into the second(middle) table cells? can we define table,row,column,cell with id's? if yes can u plz send me the sample code? |