2017-10-09 1 views
0

Je suis confronté à un problème lors de l'utilisation de IEDriver sur Windows Server 2012 R2. Sur Windows 10, le ChromeDriver, IEDriver et GeckoDriver fonctionnent parfaitement, cependant, sur Windows Server, seul ChromeDriver fonctionne.IELaunchURL() a renvoyé HRESULT 80070012 ('Il n'y a plus de fichiers.')

IEDriver revient OpenQA.Selenium.WebDriverException: erreur inattendue le lancement d'Internet Explorer. IELaunchURL() retourne HRESULT 80070012 («Il n'y a pas d'autres fichiers.) Ces configurations

J'ai ajouté:

  • Protection Mode Même
  • Registre Changements clés
  • Ajouté PATH

Versions:

  • IE 11.0.9600.17416
  • Selenium.WebDriver 3.5.1
  • IEDriverServer 3,6

Le code J'utilise actuellement est ce (C#):

InternetExplorerOptions options = new InternetExplorerOptions(); 
options.IgnoreZoomLevel = true; 
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; 
return ieDriver = new InternetExplorerDriver("Path To IEDriver", options); 

Quelqu'un peut-il s'il vous plaît aidez-moi à corriger cette erreur?

+0

OMI, 'IEDriverServer 3.6.0.0 'est compatible avec' Selenium.WebDriver 3.6.0' mais pas avec 'Selenium.WebDriver 3.5.1'. Soit augmenter Selenium à v3.6.0 ou bump down IEDriverServer à v3.5.1.0. – DebanjanB

+0

@DebanjanB Merci pour votre suggestion, mais le problème persiste, juste essayé 3.5.1 – user1343543

+0

Quelle liaison Selenium utilisez-vous Java/Python/C#/Ruby/NodeJS? – DebanjanB

Répondre

0

Ajout de "options.EnsureCleanSession = true;" résolu le problème pour moi:

InternetExplorerOptions options = new InternetExplorerOptions(); 
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; 
options.EnableNativeEvents = false; 
options.EnsureCleanSession = true; 

Conseils de la source je: Selenium WebDriver on IE11:

Local:

var options = new InternetExplorerOptions(); 
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; 
//Clean the session before launching the browser 
options.EnsureCleanSession = true; 

à distance:

capabilities = DesiredCapabilities.InternetExplorer(); 
capabilities.SetCapability("ie.ensureCleanSession", true);