I am new to QA Wizard and QAForums. I have a question about looping within a script. Is it possible that within a script and within the loop, that the looped section can pull data from the datasheet until the end of the datasheet is reached?
It seems that it cannot. Maybe there is some type of counter I can invoke within the loop to move to the next row. Once the loop is finished, the script will see that the datasheet has been "used up" and will not loop the script for each row in the datasheet.
To clarify, here is the scenario. I have a script that opens up a dialog. This dialog allows me to add a number of items. This item contains a name. My datasheet has the names i want added. What I want is to open the dialog once and continue to add names. When all names have been added, then close the dialog. From what i've learned so far, the entire script will loop several times depending on how many rows are in the referenced datasheet.
I figured it out. I guess you can't use the function "cell" for doing this. The cell function is not affected by other functions such as nextrow or prevrow. Instead I had to set a variable to get the value from the current row of the datasheet. To get the next value i just used nextrow function. This solved my delma of having to repeat the entire script for each new row.
I had posted a similar question sometime back because I had QA wizard call the log on script each time it read a new row in the datasheet and I didnt want this. I discovered that as long as you have the script tied to a local datasheet or have a datasource selected from the dropdown it was going to do this. So the workaround was to use an external datasheet and a for next loop to go thru certain number of lines of the script only.
Im new to this can anyone please tell me how to retrieve data from EXternal daasheet ie what is the code used and how to write the code using for loop ? Please help me very [stupid is as stupid does] .