Forum Discussion
Hi,
> Aliases.Handwerk.ClientBackup.btnNext.Click();
> Obj:=Sys.Process('Handwerk').Window('#32770', 'Informationen', 1);
Suggested quick fix:
Change
Aliases.Handwerk.ClientBackup.btnNext.Click();
to
Aliases.Handwerk.ClientBackup.Button('OK').Click();
or, even better, to
Aliases.Handwerk.Window('#32770', 'Informationen').Button('OK').Click();
Explanation:
Window of #32770 class is a generic Windows OS message window that is widely used in desktop applications.
Considering that your code tries to deal with the Aliases.Handwerk.ClientBackup.btnNext object, it is very likely that some notification window was previously displayed, processed and namemapped. According to the aliased object names, these were 'Client Backup' window with the Next button. Mapping attributes used to namemap the above objects appeared to be not unique and appeared to match those for the 'Informationen' window and OK button. That is why the code was recorded to deal with the ClientBackup and Next aliased objects.
Note, that all other versions of your code do not try to use the ClientBackup object and work with the current instance of the #32770 window.
Now, the tricky part: if ClientBackup window already does not exist in your application (i.e. if the window was destroyed when closed), you had to get the error in the test log that ClientBackup alias was not found. But as you did not get this error and TestComplete seems to try to do something with the Next button of the ClientBackup window, this makes me think that the window still exists in the application's memory. You may use Object Browser in TestComplete and check whether or not the ClientBackup object exists in the application's objects list right before execution of the problematic line of code.
If the object exists, I would recommend to talk to developers and ask them whether this is intentional or if this is a kind of memory leak that must be corrected.
In any case, the line of code that breaks your test seems to be dealing with wrong objects and must be corrected.
P.S. http://support.smartbear.com/testcomplete/docs/scripting/calling-methods-asynchrounously.html might be a good reading, but I am not sure that this is your case.
Related Content
- 2 years agomattb
Recent Discussions
Check PopupMenu exists
Solved3 days agomfoster711- 4 days agosimonaferrara
- 4 days agomacheshmeh