klionyard.blogg.se

Apptivate api
Apptivate api







apptivate api
  1. #Apptivate api how to
  2. #Apptivate api code
  3. #Apptivate api windows

TcObj = GetObject("", "testcomplete.testcompleteapplication") WndCaptions.push("Microsoft Visual C++") Can you move the topic to another forum? I was inattentive posting this one (didn't see it's only for web testing). Probably, another external application should be written to attempt handling error windows.

#Apptivate api how to

But I still can't imagine how to apply this one to all my tests and all methods that could cause unexpected errors.Īt the moment, I have no ideas of JS-script improvement or anything else. I also read that using JS-script is obsolete and Runner.CallObjectMethodAsync() method could be used. I determined that the script even couldn't find this window - warning message posts to TC's log only after I press "Ok" button by myself or activate any other application (error window disappears then).

#Apptivate api windows

It works perfect with first type of windows (Visual Studio just-in-time debugger errors) in wndCaptions array but can't handle "Microsoft Visual C++ Runtime Library" windows though I thought it had worked before (I've attached it's screenshot). I am using external JS-script proposed higher with little modifications to handle more than one type of window. But my problem with closing all error messages is still actual. What's the reason? Can I solve this problem by any methods?įorgive me for posting here again. I tried to simulate "Start" button pressing, and received click events in my log.but in real nothing has changed - application's window and modal error window described higher are still preventing normal script execution. Only after this script continue it's work and stops. According to received logs the application's process is already terminated but any actions, for example, aqUtils.Delay(.) or Runner.Stop(true) can't be performed before I activate any other application or press Windows' "Start" button manually. This one works fine in most cases but sometimes application crashes with "Microsoft Visual C++ Runtime Library Error" window. Runner.Stop(true) // stopping current test only Log.Message("Stopping test case execution.") () // sending instructions to terminate process Log.Message("Attempt to terminate process.")

apptivate api

Log.Message("Application's process is already terminated") * Checking application's process for existance */ Log.Error("Termination reason: " + ErrorMessage) Var TerminationTimeOut = * 1000 // in milliseconds Var ErrorMessage = "Unknown error or exception" Log.Message("Process existance is checked") Var ProcessExistance = Sys.WaitProcess(ProcessName, 0).Exists Log.Message("Checking process existance")

#Apptivate api code

Here this the code sample where I try to terminate process (if necessary) and stop test item run. I successfully cought exceptions caused by application's crash. Any advice will be useful.įorgive me for posting twice. And seemed to me, this is not unexpected window or I still don't know how to handle it (project's playback options for unexpected windows are "Click on focused control" and below). Sometimes I also receive "Visual Studio++ Runtime Error" window when the application crashes. I tried to set "Stop on exception" and "Stop on error" for test items but these options are not suitable in this case. But how can I catch all exceptions in one place to avoid TestComplete questions and continue project run automatically? I had to say "No" manually everytime I wanted to continue testing by next test item.

apptivate api

Do you want to stop the project execution?".

apptivate api

Therefore, TestComplete project stops with following message: "The following error occured while the element specified in the "Test-case #0002" test item was being executed. I tried to catch them using "try.catch" construnction in "Testing" but it doesn't work. These exceptions occur in other script units. During project execution the application may crash, and then script stops with an exception or/and error. I created few test items and then ran the project. All manipulations with application's interface are discribed by functions in other units which included in "Testing" by //USEUNIT. I have main script unit called "Testing" where test routines are placed. I'm new in testing, so need your advice about running script tests for my Visual Studio C++ application in TestComplete 7 (JScript language is used).









Apptivate api