Micro Focus QTP (UFT) Forums
How to check to see if a text field is available? - 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 check to see if a text field is available? (/Thread-How-to-check-to-see-if-a-text-field-is-available)



How to check to see if a text field is available? - dol_fin - 02-17-2012

Sorry in advance if i am not clear in what i am about to ask.

I have generated a script that logs in with three accounts (global sheet) and generates a price quote for shipping information.

I generated a script using a login that when entering the shipping information to generate a quote does NOT require an account #.

But the second and third logins require an account #. The script will obviously fail for that second and third iteration because the original script was generated without the account # field.

SO my question is: how to get the script to bypass the account # field for the second and third iteration while still entering the other information (such as origin zip, destination zip code, etc).

I know i would have to use if else then statement but if someone could explain to me or direct me in the right direction? I would really really appreciate it. And sorry again if i am not clear. Thank you


RE: How to check to see if a text field is available? - basanth27 - 02-17-2012

you will have to set a flag at the end of iteration 1. Lets say you set it to 1.

Code:
if blnflg = 0 then
' enter the account field value
end if

does it help?