Post by sascanagl on Jul 19, 2017 14:57:48 GMT
We have experienced issues of SAFS and SeleniumPlus working fine on Windows 7, and then immediately following an upgrade to Windows 10 having significant runtime problems. For example, Chrome crashing with "Chrome Automation Extension has crashed" and unable to run tests while the normal manual interaction with Chrome is working fine.
We traced this down to new User Account Control (UAC) policies on Windows 10.
User Account Control Overview
User Account Control and How To Change It In Windows 10
Unfortunately, running an "Administrator" account on Windows 10 does NOT automatically grant all Administrator privileges. The user is often prompted to manually grant Admin rights for simple tasks of creating files, moving files, deleting files and other tasks--even if they have already set UAC to "Never" prompt for Admin rights. This is called "Admin Approve Mode" on Windows 10. This does not work well for test automation which requires unobstructed access to the system since manual intervention by the user is not possible.
To fix this issue, Administrator accounts must have Admin Approve Mode disabled. That, or any and all assets and file system locations that might be touched by the automation must individually be changed to full access prior to running the automation. There may also be options to have all automation assets, programs, and interactions NOT be on the same drive housing the OS--typically the C: drive. However, that has not been tested or confirmed.
The simplest and most effective way to do this is to change the "EnableLUA" registry setting to make Admin Approve mode disabled (0). Any change to this setting requires a full system reboot to take affect. Note, however, that changing this setting removes all the Admin Approve Mode protections normally provided by the system as documented in the articles linked above.
The full path to the Registry setting enabling this change:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
EnableLUA 1=Enabled; 0=Disabled
A reboot is required for these settings to take affect.
However, this can present new problems.
While Chrome/ChromeDriver seems to become functional by disabling this LUA control, Microsoft Edge/MicrosoftWebDriver will NOT function with LUA disabled. EnableLUA=1 must be set to allow Microsoft Edge/MicrosoftWebDriver to function properly.
We traced this down to new User Account Control (UAC) policies on Windows 10.
User Account Control Overview
User Account Control and How To Change It In Windows 10
Unfortunately, running an "Administrator" account on Windows 10 does NOT automatically grant all Administrator privileges. The user is often prompted to manually grant Admin rights for simple tasks of creating files, moving files, deleting files and other tasks--even if they have already set UAC to "Never" prompt for Admin rights. This is called "Admin Approve Mode" on Windows 10. This does not work well for test automation which requires unobstructed access to the system since manual intervention by the user is not possible.
To fix this issue, Administrator accounts must have Admin Approve Mode disabled. That, or any and all assets and file system locations that might be touched by the automation must individually be changed to full access prior to running the automation. There may also be options to have all automation assets, programs, and interactions NOT be on the same drive housing the OS--typically the C: drive. However, that has not been tested or confirmed.
The simplest and most effective way to do this is to change the "EnableLUA" registry setting to make Admin Approve mode disabled (0). Any change to this setting requires a full system reboot to take affect. Note, however, that changing this setting removes all the Admin Approve Mode protections normally provided by the system as documented in the articles linked above.
The full path to the Registry setting enabling this change:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
EnableLUA 1=Enabled; 0=Disabled
A reboot is required for these settings to take affect.
However, this can present new problems.
While Chrome/ChromeDriver seems to become functional by disabling this LUA control, Microsoft Edge/MicrosoftWebDriver will NOT function with LUA disabled. EnableLUA=1 must be set to allow Microsoft Edge/MicrosoftWebDriver to function properly.