0
votes

I'm running WATIR automated tests using Selenium WebDriver on a Windows XP remote desktop, and I noticed that when I minimize the RDC I start getting random Element is not currently visible errors for my assertions. If I leave the RDC maximized and sit and baby-sit the tests ,they all run fine. I have found that the combination of software versions below, even though newer versions exist, give me the least number of compatibility issues.

ruby (1.8.7) selenium-webdriver (2.21.2) watir-webdriver (0.6.2) firefox (10.0.2)

Thoughts on why the tests only run with the RDC visible?

1
RDC? what are you meaning by that? what if it's not maximized, but just a window? will things work then? if so that might be a workaround. - Chuck van der Linden
trying adding some delay before locating element..would be useful to see some of your code.. - Xwris Stoixeia

1 Answers

1
votes

When you minimize a Remote Desktop session it becomes GUI-less and GUI actions will fail.

The solution that we use for RIATest is as follows (not sure if it will help with Selenium but it should).

In the client machine from which you connect do this:

  1. Close all Remote Desktop sessions.
  2. Open Registry Editor.
  3. Go to key HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client (or HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client if you want to set it for all users).
  4. Add a DWORD value RemoteDesktop_SuppressWhenMinimized and set it to 2.
  5. Close Registry Editor.