1

We've been using Selenium to automate some browser testing in Internet Explorer. On Windows 7 32-bit it works fine. However we're testing it on Windows 10 64-bit and it fails miserably.

  • Sometimes the browser doesn't even launch
  • If i change the driver versions, i can get the browser to launch but it hangs on the first page
  • The issue is only present when I use ForceCreateProcessApi. However I need to use ForceCreateProcessApi in order to use BrowserCommandLineArguments!
  • The exception is: The HTTP request to the remote WebDriver server for URL http://localhost:16639/session timed out after 60 seconds.

Here is the PowerShell code i use:

$seleniumOptions = New-Object OpenQA.Selenium.IE.InternetExplorerOptions
$seleniumOptions.InitialBrowserUrl = $SiteUrl
$seleniumOptions.ForceCreateProcessApi = $true
$seleniumOptions.BrowserCommandLineArguments = "-k"
$seleniumOptions.IgnoreZoomLevel = $true

New-Variable -Name IEDS -Value ([OpenQA.Selenium.IE.InternetExplorerDriverService]) -Force
$defaultservice = $IEDS::CreateDefaultService()
        
$seleniumDriver = New-Object OpenQA.Selenium.IE.InternetExplorerDriver -ArgumentList @($defaultservice, $seleniumOptions)

I've tried the following versions (x86 and x64 versions), and none of them work:

2.25.3
3.141
3.9.0

Can anybody advise on how to make this work? I've made sure that TabProcGrowth etc is set according to the documentation.

Thanks.

SuperStormer
  • 4,997
  • 5
  • 25
  • 35
Captain_Planet
  • 1,228
  • 1
  • 12
  • 28

1 Answers1

0

Try to use a 3.150.1 32-bit driver.

I'm not sure how it looks on PS - but I'm able to run IE with this driver config.

ie: { version: "3.150.1", arch: "ia32" }

Also I have a key for iexplore.exe here:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE

from this config link

unickq
  • 1,497
  • 12
  • 18
  • Thanks for the reply. I've tried all this - I've placed the x64 driver exe in the system32 folder, the x86 driver exe in the SysWOW64 folder, I've used the 3.141.0 WebDriver and WebSupport DLLs, I've ensured FEATURE_FCACHE is in HKLM and HKLM\Wow6432Node locations, and HKCU too, I've ensured Enhanced Protection Mode is off, I've ensure zoom is set to 100% too. What a pain.... – Captain_Planet Nov 04 '20 at 17:35
  • But I wrote about FEATURE_BFCACHE and 3.150.1. And you don't need to put anything to system32 and SysWOW64. And yes, PS with selenium is a pain. Why don't you switch to C#? – unickq Nov 04 '20 at 18:56
  • Thanks, and sorry for the typos above. In the end I've refactored the solution to use the Chrome driver. Less buggy and works faster! I did set the registry value above, and tried the version you mentioned too. – Captain_Planet Nov 04 '20 at 23:12