![]() |
Read next datatable rather than login again - 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: Read next datatable rather than login again (/Thread-Read-next-datatable-rather-than-login-again) |
Read next datatable rather than login again - cocojava - 10-21-2010 QTP10 IE8 XP I apoligize for opening a new thread, as I'm just trying to get this datatable understood. I've created, what I hope will be an easier method to explain: Now here we loginto the flight reservations system and select a rate. We seem to be bound to perform an next step from here. We can use a datatable with multiple signins & passwords. Code: ystemUtil.Run "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","D:\Program Files\HP\QuickTest Professional\samples\flight\app\","open" What I need to be able to do is signin ONCE. Use an App (like to ck the status of a flight, and then another and another (which would be like in a datatable; but I don't want to logout each time. I've tried to split this action into two, one for login and one for performing the flight; but as it goes through the datatable it wants to log back in. As I said, that was under the action that I split. This is getting very discouraging. Overall-once user logs in I want to stay in the App. RE: Read next datatable rather than login again - Saket - 10-26-2010 you are on correct way, use two seperate reusables for login and Flight operations, assemble/call them in a test, do not put anything on datatable for the test, all the data should be in corresponding reusable datatable and that way you can iterate your required reusable. RE: Read next datatable rather than login again - cocojava - 10-26-2010 First, let me say 'Thank you Saket', for responding as this has been most discouraging as I know WHAT I want it to do; but I'm too new to Make it happen. I understand your statement up to a point 'you are on correct way, use two seperate reusables for login and Flight operations, assemble/call them in a test' If I don't put the data to a datatable-Where does it go? I also don't understand the ' iterate your required reusable' Is it possible there may be an example somewhere of what your speaking? Again, Thanks for helping me figure out this App. I've come to rely on this forum more than you know. RE: Read next datatable rather than login again - KVK - 10-26-2010 Hi, You can use the below code, 1. Set the test settings as "Run One Iteration Only" Goto - > Test Settings ->RUN--> Select "Run One Iteration Only" 2. Add Parameters Names(Column names) as given in the code in Global DataTable 3. Add required data in the respective cells in the Global DataTable Here is the code, Code: SystemUtil.Run "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","D:\Program Files\HP\QuickTest Professional\samples\flight\app\","open" Thanks Vinod Hi... Small correction in the code.. please use the below code, Code: SystemUtil.Run "D:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","D:\Program Files\HP\QuickTest Professional\samples\flight\app\","open" RE: Read next datatable rather than login again - sreekanth chilam - 10-26-2010 Hi KVK/cocojava, Go through the Posting guidelines once. Wrapup the code using "insert Fomatted Code" feature while posting. RE: Read next datatable rather than login again - Saket - 10-27-2010 Hi Cocojava, if I am getting it clearly, you want to login once and do the flight operation multiple times. let me know if I am incorrect. for this you will need to create two reusable, one for login and one for flight operation, put the login code into the login reusable, you can pass the username and password either using data table or action parameter, then the flight operation part could be in another reusable and pass you data in the datatable, could be on multiple rows depending on your requirement. then you just need to iterate through all the rows of your this reusable only. coz if you iterate for a single reusable consisting both login and operation together, everytime QTP will login and do the same operations and corresponding login data will be required. same goes if you put data in your global sheet. your login reusable could be something like Code: SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open" flightoperation Code: f Window("Flight Reservation").Exist Then Code: date from to name Code: RunAction "Login [Login]", oneIteration, "name", "mercury" hope this will help you, let me know if you any difficulties. RE: Read next datatable rather than login again - cocojava - 11-02-2010 Saket, Thank you so very much! Your right on target for what I'm trying to do- it makes sense now. ![]() RE: Read next datatable rather than login again - cocojava - 11-05-2010 Saket, you Rock!! (good thing). This was a real headache for a rookie muddleing through. THANK YOU! |