![]() |
Logic doubt - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Logic doubt (/Thread-Logic-doubt) |
Logic doubt - Prema - 10-19-2010 Hi, In my application we are having values as links in grids with pagination based on the records in the DB. I need to find a value in the grid and click to do actions.The value that i want to search may be in the first page or in any where in the pages of the application. 1.Values for search wil be given in the QTP datatable. 2. i am getting the total no.of pages, starting from the first page i am getting the total records inside the page ( Grid). 3. then i am comparing the search value with the grid value if matches then run some statements and then it should exit from both loops and start from first line of code for the second given value. The following is my code: Code: row = DataTable.GetSheet("Global").GetCurrentRow But the above code is not working as excepted. Exit For for the inner loop is working but the outer loop is not working. can anybody help me. RE: Logic doubt - KavitaPriyaCR - 10-19-2010 Prema, This will not quit from the outer loop. Because "Exit For" transfers control to the statement following the "Next" statement, so your 2nd "Exit For" will never be executed. RE: Logic doubt - manishbhalshankar - 12-08-2010 Try modifying your code as follows: PHP Code: Dim condition |