Page 1 of 2

application switching

Posted: Tue Aug 30, 2016 9:05 pm
by mander95
If I run ranorex, my app switching shortcut stops working. I've tried with other apps and they work fine and when I exit out of ranorex, it works normal. Is there any particular reason why this is occurring and how can I allow app switching while ranorex is running?

Re: application switching

Posted: Tue Aug 30, 2016 9:53 pm
by krstcs
What do you mean by "app switching" and can you post a copy of the shortcut you use? I have no issues with switching between applications while Ranorex is running, or even by using Ranorex to do it (I have tests where I have to use a Java application and then a web site in the same suite).

Please provide more information as to what you are trying to accomplish and what you are expecting.



Also, provide the following every time you raise an issue in these forums:

Ranorex version
Windows version
Ranorex Snapshot of applicable elements
RanoreXPath of applicable elements
Ranorex Report containing error information (or the full text of any error if there is no report available)

Re: application switching

Posted: Thu Sep 01, 2016 9:49 pm
by mander95
I am running Ranorex 6.0, and windows 8.1. I am trying to use the Alt+Tab shortcut to switch through rececntly used applications but this shortcut doesn't work while Ranorex is running. if I exit the app, it works just fine.

Re: application switching

Posted: Fri Sep 02, 2016 3:34 pm
by krstcs
There are 3 versions of Ranorex 6.0 (6.0.0, 6.0.1, 6.0.2), please be specific about which one you are using, as there are bug fixes in the later patch versions that might apply to your situation.

You don't need to use Alt-Tab when testing with Ranorex. Ranorex will automatically bring the desired application window to the foreground when it needs to do actions against it, if you leave the default settings.

In addition, unless you are testing Windows itself (which you probably aren't, as MS doesn't use Ranorex to test core Windows features (some would say they don't use ANYTHING to test core Windows features, but I digress... :D )) then you really don't need to test Alt-Tab functionality as it is probably out-of-scope for anything you are likely testing. The only applications that usually have trouble with Alt-Tab are DirectX applications that usually can't be tested with Ranorex anyway.

If you are attempting to use the system while Ranorex is running, please do not. Ranorex expects to have full control of the system while it is running and any actions you take can interrupt the test and cause errors due to your mouse/keyboard input.

Finally, if you are using any keyboard shortcuts in your test, make sure that you have both a DOWN and an UP action for the Shift/Alt/Ctrl keys.

Re: application switching

Posted: Thu Sep 08, 2016 7:16 pm
by mander95
Ranorex 6.0.0
Ok, then how do I return ranorex to it's default settings because I've been manually putting in a delay so that I can manually navigate to the necessary page and then the tests execute? That's probably the main issue.
Also, I meant that while Ranorex is open in general I couldn't switch tasks regardless of whether or not a test was executing.

Re: application switching

Posted: Thu Sep 08, 2016 9:45 pm
by krstcs
Without seeing your code, I couldn't tell you what to change to get what you want. Also, if you are using a version control system, you could just remove the commits that put in the delays, or look back at the history and see where the changes were made an revert them manually.

NOTE: If you aren't using a version control system (Git/GitHub, SVN, TFS, etc.), stop ALL coding and get your current code into a VCS of some kind immediately! You are developing test software using the Ranorex tools, so you must treat it the same as any other software development! It is vital to any software project that proper version control be used. This will save you from mistakes and lost code (which is lost time, which is lost money!), and it will allow you to better manage when and what features get implemented in your tests.

If you are testing a web page, Ranorex has a built in action called Start Browser that will accept any URL and one of the supported browsers' names as parameters from the action table (you can also convert to code and get many more features).

I would highly recommend reading the User Guide and looking at the free webinars and other tools on this site, if you haven't. They cover this topic as well as many others that you will run into while developing your tests.

http://www.ranorex.com/support/user-guide-20.html

Re: application switching

Posted: Fri Sep 09, 2016 2:42 pm
by odklizec
Hi,

In addition to what Kelly suggested, performing manual actions during the test execution is a big no-no! You should definitely not interact with apps/desktop while the test is running. If your test requires switching between the apps, you should definitely do this within the test and not manually!

Re: application switching

Posted: Tue Sep 20, 2016 6:15 pm
by mander95
So if I try to use the Alt+Tab shortcut to alternate between recently opened applications while Ranorex is open (not running a test, just open) the short cut can't be used. The second I close the application however, it works again. This apparently also enables Ranorex to recognize what is at the forefront of the screen. What I mean is that if I have the application that I want to make an automation for open but Ranorex is also open and what you see is Ranorex in the foreground, Ranorex doesn't automatically go to the application. I know that this is possible because Ranorex was able to put the application in the foreground a few weeks ago but I don't know what setting has changed between then and now that allows this to happen. What is this setting?

Re: application switching

Posted: Tue Sep 20, 2016 9:12 pm
by Aracknid
By chance, are you talking about Ranorex Spy, and the "always on top" checkbox setting, located near the top right of the spy window? If Spy is Maximized, I can see how that would throw you off if you didn't realize this option was checked. I don't use the Studio or other Ranorex programs (I only use the Spy) so I'm not sure if something equivalent is in those. Have a look.

Aracknid

Re: application switching

Posted: Wed Sep 21, 2016 2:47 pm
by Support Team
mander95 wrote:I know that this is possible because Ranorex was able to put the application in the foreground a few weeks ago but I don't know what setting has changed between then and now that allows this to happen. What is this setting?
Could it be that you completely turned off UAC (User Account Control) in Windows 8.1?

The problem with Alt+Tab not working any more if a Ranorex tool is started is a known issue in Windows 8.1 if UAC is turned off. If you need to keep it turned off, you can try to uncheck the "Use asynchronous dispatching of mouse and keyboard events" setting in the "Advanced" tab of the Ranorex settings.

Regards,
Alex
Ranorex Team

Re: application switching

Posted: Thu Sep 22, 2016 6:32 pm
by mander95
The problem was the "asynchronous dispatching" setting, after I unchecked it, alt+tab was fixed but Ranorex Studio doesn't automatically close it's main window to run through the test like it used to.

Re: application switching

Posted: Thu Sep 22, 2016 8:56 pm
by Support Team
mander95 wrote:The problem was the "asynchronous dispatching" setting, after I unchecked it, alt+tab was fixed but Ranorex Studio doesn't automatically close it's main window to run through the test like it used to.
OK, great. There are some disadvantages in turning that setting off, mainly while recording. So if you experience problems while recording, please turn it back on.

And for finding out the root cause, can you tell me if you have UAC switched off?

Regards,
Alex
Ranorex Team

Re: application switching

Posted: Tue Sep 27, 2016 9:13 pm
by mander95
For now, the UAC is off so that I can use the app switching shortcut between tests, but regardless of whether or not the the UAC is on or off, it doesn't automatically track the pages that I am trying to automate. For example, when I started working with Ranorex a few months ago, I would just hit the run button for the tests and as long as the page that I was on before opening ranorex, it would automatically go to that page without me manually minimizing Ranorex. Now, however, I have to minimize Ranorex Studio to test a specific page or if I open an application in through ranorex, that's fine.

Re: application switching

Posted: Thu Sep 29, 2016 2:19 pm
by Support Team
mander95 wrote:For now, the UAC is off
I guess you got me wrong. I meant that turning UAC off completely may be the cause for your issues. I wanted you to turn it back on if it is turned off. There is also a registry setting to disable UAC altogether, did you add such an entry?

Another cause may be that you set Ranorex to start as Administrator by default using the settings on the RanorexStudio.exe file directly. This may cause weird issues (no one knows why).
If you instead create a shortcut and check the "Run as administrator" box in the Advanced settings instead, this should work instead. (See Reason/Solution #4 in this troubleshooting section).

Regards,
Alex
Ranorex Team

Re: application switching

Posted: Thu Oct 13, 2016 5:08 pm
by mander95
changed the advanced setting so that UAC is enabled and Ranorex isn't automatically set to open as an admin. That fixed the task switching issue, but Ranorex still doesn't automatically minimize when tests run. Although, when I manually abort the test or if the test runs all the way through, Ranorex automatically opens back up with the report.