How to use same script for multiple URLs - 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 use same script for multiple URLs (/Thread-How-to-use-same-script-for-multiple-URLs) |
RE: How to use same script for multiple URLs - QTPScript - 08-30-2012 PLEASE SEE ATTACHMENT. I THINK THAT'S THE PROBLEM. PLEASE CONFIRM ONCE PROBLEM SOLVED SO THERE USER CAN USER CAN UNDERSTAND EASILY. Code: DataTable.Import("C:\nis.xls") Above code is working and tested. please see RE: How to use same script for multiple URLs - mansis - 08-31-2012 Hi, Thanks a lot.. Now the described error is removed.. it was because of while pasting code, it copies wrong ", which is now corrected. Now new error occurs which is attached.... Please help me with it.. RE: How to use same script for multiple URLs - Sathiya - 08-31-2012 Before loop try to get the number of rows and assign that to some variable like "rowcount=DataTable.RowCount" msgbox rowcount For i=rowcount xxxx yyyy Next RE: How to use same script for multiple URLs - mansis - 08-31-2012 Hi, Tried as per your suggestion.. but same error occurs.. pls review attached screen shot.. Thanks, Mansi. RE: How to use same script for multiple URLs - Sathiya - 08-31-2012 Try with the below one Code: sVal=Datatable.GetRowCount RE: How to use same script for multiple URLs - mansis - 08-31-2012 Hey,, now its fully working, without error Thank you so much.. But still I have one issue.. Please review below code and attached snap shot of datasheet.. According to me, on running this script, it should first login into first URL and then next one and after that it should be stopped.. But with below code, it first login into with first URL, then next one and "AGAIN login with first URL and second one" which is wrong.. Can you please corrrect me what is wrong in below code?? -------------- Code: DataTable.Import("D:\Book1.xls") ------------ RE: How to use same script for multiple URLs - mansis - 08-31-2012 Hi, Can anyone please help me urgently.... When I run below script, it performs goes into infinite loop.. Consider that in datasheet I have 5 rows in my data sheet, it executing scripting multiple times, though all 5 URL are once opened and described operations are mentioned. It should open each 5 URL one time instead of multiple time.. Please let me know where I am wrong in below script? --------------- Code: DataTable.Import("D:\Book1.xls") ----------- Thanks, Mansi. RE: How to use same script for multiple URLs - mansis - 09-01-2012 Help me pleaseeeeeeeeeeee... RE: How to use same script for multiple URLs - basanth27 - 09-01-2012 Is the test settings for datatable run on all rows? RE: How to use same script for multiple URLs - mansis - 09-01-2012 Hi Basanth, Yes Test setting for datatable run on all rows, which was wrong.. Due to which loop enters in infinite... Now it is working fine for me.. Thanks a lot to all of you for your precious help. .. With all of your help, I was able to prepare a complete script for my project..Thanks again.. |