Quality Testing

Quality is delighting customers

Is it possible to debug the script statement...which is having Exist Method

 

 

1.On Error Resume Next

2.InvokeApplication "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"

3.If Dialog("Login").Exist(2) Then   

4.Dialog("Login").WinEdit("Agent Name:").Set DataTable("uname", dtGlobalSheet)   5.Dialog("Login").WinEdit("Password:").Set DataTable("pwd", dtGlobalSheet)   6.Dialog("Login").WinButton("OK").Click   

7.Reporter.ReportEvent micPass,"Login","Login done succefully..."If Window("Flight               Reservation").Exist(6) Then   

8.Window("Flight Reservation").Close   

9.Reporter.ReportEvent micPass,"Flight Window","Flight Window Succefully closed.."

10.Else  

11.Reporter.ReportEvent micFail,"Flight Window","Flight window does not exist.."

12.End If

13.Else   

14.Reporter.ReportEvent micFail,"Login","Login failed..."End If

15.If err.number <> 0 Then print "Error number is ...." & err.number & "      And Error description         is" & err.description else print "No error occured..."

16.End If

While Debugging above script,at Line number 3 ...debugging fails.

I have a doubt ,can we able to debug the statement which is having exist method.?

Please share your valuable thoughts

Views: 182

Reply to This

Replies to This Discussion

yes it can be debugged easily put Dialog("Login").Exist(2) in Add to watch and u can see true or false.

Hi Mrinal Rao,

Tanks for your reply.

I done same,But debugging is struck at 3rd line.

If you have enough time try to execute my script(Place break point at 2nd line.)

Please Resolve the Issue.

Thanks in advance.

 

regards 

Suresh Ch

Just chk if you have Dialog("Login") object in repository.

You can try commenting the first line. It is advisable to have that one included after ensuring the script is executing fine (once you debug the code and everything works fine). But, this may not be the reason for the debug issue though, on the other hand I have seen that statement creating problems while debugging. 

Regards,

Arvi, QTPhelp.com

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service