| Testing Tutorials Testing Tutorials and Articles Discussions |
![]() |
| LinkBack | Thread Tools | Search this Thread |
|
|||
|
If then else in QTP
I was learning parameterization with QTP and encountered problem when i ran my script.
The exact scenario is ..I tried to login with different usernames n third one was an incorrect name. I wrote an If condition to run my script smoothly. the script looks like this The first few lines were recorder scripts which would enter user name and password. Then i wrote the condition if Dialog("name:= Flight Reservations").Exist Then Dialog("name:= Flight reservations").Winbutton("name:=OK").click Dialog("name:=Login").Winbutton("name:=Close").Click Else Window("flight Reservation").Close End If End With This was to close window which popped up as a result of the incorrect username with less than 4 char. Error was thrown while running the script in the third iteration which would check the THEN condition. Could anyone please sort this out for me to find out where the exact problem is? |
| Sponsored Links |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|