cancel
Showing results for 
Search instead for 
Did you mean: 

SetText issue, upgrading from TC11.31 to TC12.31

Occasional Contributor

SetText issue, upgrading from TC11.31 to TC12.31

So i just upgrade my project from TC11.31 to TC12.31, however i encounter a problem when i am using SetText method to certain edit box. The error is as shown in picture below, somehow it detect unexpected window but there wasn't any other window. There's also the log error "the operation was interrupted by the user", but i didn't do anything.
The code was working fine on TC11.31, can anyone help me on this?

Capture.PNG

5 REPLIES 5
Highlighted
Community Hero

Re: SetText issue, upgrading from TC11.31 to TC12.31

I see that, for each of those errors, there is a picture included.  Does the captured picture give any visual indication as to what's going on?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Occasional Contributor

Re: SetText issue, upgrading from TC11.31 to TC12.31

Thank you for your response.
I just check the captured picture, however i didn't see anything wrong.
On the first error "Unexpected window", it only showed the dialog window that have edit box that i want to fill.
On the second and third error, it showed the entire windows desktop while the application is running.

I have tried using the "Ignore Unexpected Window" on the project properties, however I receive the following error:
"The 'Default Library' window is invisible and thus cannot be activated. 10:15:49 Normal "

"The test execution was interrupted. 10:15:49 Normal "

This is so weird because the edit box that i want to SetText in not in the 'Default Library' window,
I don't even  have 'Default Library' window on my name mapping.

Community Hero

Re: SetText issue, upgrading from TC11.31 to TC12.31

Try setting a breakpoint on the test line before the one that gets the error.  Let the test pause there so you can click through the test steps manually and see what's happening.  That may give you a clue.

Occasional Contributor

Re: SetText issue, upgrading from TC11.31 to TC12.31

Finally figured the workaround for this.
So i used the FindChild method instead of the mapping (still not sure why the mapping didn't work tho):

Aliases.MainWindow.FindChild(["WndClass","ControlId"],["Edit",1745],6,true).SetText(100);

Thank you for the replies!

Community Hero

Re: SetText issue, upgrading from TC11.31 to TC12.31

It depends somewhat on the criteria you are using for the mapping of the dialog.  Additionally, there may be a timing issue where you are attempting to act on a window/component before it's available for action.  Either one of those could cause behavior where windows and objects are not being recognized and acted on in a timely fashion.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video: