Forum Discussion
row no | status | function | Value |
4 | enable | validate value in table | abcd |
5 | enable | click button |
If row table value validation fails then i want to write a function like the below one
If Validate value in table = err |
click ok on the message box |
click ok again on the screen |
then go to row 4 and validate the value again |
Is this possible in VB script? Ours is keyword driven
The short answer is: yes. Basically, while you're within the same loop, there's no need to "go to row 4". You're already on row 4, you just exercise your logic as you have it written. Until you go back through the loop a second time, the values in the current row (row 4) are still available to you.
- GAutomation8 years agoFrequent Contributor
i=0// intializing i because err may find any row inside the table
while (table= err)
button1.click()
button2.click()
if message box. exist then // some scenario's a meaasge box appears
checkbox.click()
button3.click()
end if
wend
i=i+1
1.if implemented this and the if statement is not getting executed.
2.if i comment the if statement the loop goes on and never ends
somewhere i go wrong
- tristaanogre8 years agoEsteemed Contributor
While I appreciate the use of pseudo-code to get across concepts, it is next to impossible to debug logic problems without knowing the exact code. Variables may be set wrong, methods may be used improperly, etc. Please, if you can, share your exact code... or, if nothing else, something that as closely resembles your exact code as much as possible.