Forum Discussion
> Unfortunately this also doesn't work.
Any message in test log or on screen?
I would say this is more than starnge...
Out of curiosity, can you check that correct button object is addressed?
For example, assuming this test code:
nextButton = w["Window"]("TNewButton", "&Next >", 1); nextButton["SetFocus"](); nextButton["Keys"](" "); // space between quotes
can you set a breakpoint at the
nextButton["SetFocus"]();
line and when the execution stops on the breakpoint check the following:
-- Select installer's window and press Tab to move focus from Next button to some other control (guessing Cancel button);
-- Return to TestComplete and execute Step Over command;
-- Switch back to installer and check if the Next button got the focus;
-- If it does not, tehre are chances that wrong object is used. The quick check would be to execute this command from the Evaluate dialog: Sys.HighlightObject(nextButton). Upon execution, TestComplete should switch to installer and flash the button several times. Alternatively, you may use Object Spy and check current running properties of the button;
-- If the button gets the focus, try Step Over one more time and check if the button was clicked. If it is, it might be a timing issue and some delay may be required between setting focus to the button and clicking it.
Hello Alex,
Thanks for your reply. I found a solution with help from one of your collegues. When running TestComplete as administrator, it is possible to click on the buttons and execute the installer. So this would solve my problem.
Thanks for your help!
Kind regards, Arnout
- AlexKaras6 years agoChampion Level 3
Hi Arnout,
Thank you for the update of the thread and it is good to know that you already have a solution.
I am curious to find the explanation of the situation so could you answer these questions:
-- Is it correct that initially TestComplete was started on behalf of a regular user without any permissions elevation?
-- Is the tested installer started as a Tested Application (and thus it inherits permissions of TestComplete) or some other way?
-- Is UAC (User Access Control) window with the request to allow changes confirmation displayed on installer's start? Or UAC is disabled on this test system? If UAC is displayed, do you handle it manually or via some test code?
- Adam16 years agoOccasional Contributor
Hello Alex,
-- Is it correct that initially TestComplete was started on behalf of a regular user without any permissions elevation?
yes, that's correct
-- Is the tested installer started as a Tested Application (and thus it inherits permissions of TestComplete) or some other way?
yes, it's started as tested application
-- Is UAC (User Access Control) window with the request to allow changes confirmation displayed on installer's start? Or UAC is disabled on this test system? If UAC is displayed, do you handle it manually or via some test code?
UAC is disabled on this system. I don't know if this can be handled by TC
The answer that I get from your collegue:
"TestComplete likely needs additional permissions in order to automate actions over an installer. Installation of an application is not a standard task, additional security is implemented to prevent malicious applications from automatically installing applications.
Furthermore, I do not anticipate any conflicts executing your existing tests when running TestComplete as an administrator."Regards, Arnout
- AlexKaras6 years agoChampion Level 3
Hi Arnout,
Aha, thank you for your answers. They correspond to my idea and my current understanding is like this:
-- TestComplete was started with a regular set of permissions;
-- Installer was spawned with the same set of permissions;
-- While initializing, installer requested permissions elevation and got them automatically without any message been displayed because of disabled UAC;
-- The result of the above sequence is that TestComplete appeared to have lower level of permissions than the application it tried to control. This can result in different problems and your one well could be one of them. Some more description can be found here: https://support.smartbear.com/testcomplete/docs/general-info/configuring/testing-under-admin-account.html
Thank you for this case - I'll put it into my notes. :)
> UAC is disabled on this system. I don't know if this can be handled by TC
UAC has three levels - high, middle and low.
High level (default one) blocks display and cannot be handled using test automation tools.
Middle level will display a regular Windows dialog that TestComplete can handle.
Low level disables UAC and no message to the user is dislayed at all.
P.S.
> The answer that I get from your collegue
I am not employed by Smartbear as it is stated in my signature. I'm just a user of their products who like them and is willing to help others when I can. :)
Related Content
Recent Discussions
- 18 hours agovladd1