Je reçois cette erreur ci-dessous alors que j'exécute mon protractor. Et ci-dessous est l'erreur telle qu'elle apparaît dans ma console webstorm.
"C:\Program Files (x86)\JetBrains\WebStorm 2016.2\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\built\cli.js C:\Users\x216526\workspace_Protractor\SWA_Protractor\conf.js [17:59:58] I/direct - Using ChromeDriver directly... [17:59:58] I/launcher - Running 1 instances of WebDriver [18:00:01] E/launcher - session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"9784.1","isDefault":true},"id":1,"name":"","origin":"://"} (Session info: chrome=54.0.2824.0) (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) [18:00:01] E/launcher - SessionNotCreatedError: session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"9784.1","isDefault":true},"id":1,"name":"","origin":"://"} (Session info: chrome=54.0.2824.0) (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) at WebDriverError (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:26:26) at SessionNotCreatedError (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:307:26) at Object.checkLegacyResponse (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:639:15) at parseHttpResponse (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:538:13) at c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:472:11 at ManagedPromise.invokeCallback_ (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14) at TaskQueue.execute_ (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14) at TaskQueue.executeNext_ (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21) at c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2820:25 at c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7 From: Task: WebDriver.createSession() at Function.createSession (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:329:24) at Driver (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\chrome.js:778:38) at Direct.getNewDriver (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\direct.js:68:26) at Runner.createBrowser (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\built\runner.js:187:43) at c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\built\runner.js:261:30 at _fulfilled (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54) at self.promiseDispatch.done (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30) at Promise.promise.promiseDispatch (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13) at c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49 at runSingle (c:\Users\x216526\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:137:13) [18:00:01] E/launcher - "process.on('uncaughtException'" error, see launcher [18:00:01] E/launcher - Process exited with error code 199 Process finished with exit code 199
Mon fichier de configuration js ressemble à ceci :
exports.config = {
directConnect: true, // Capacités à transmettre
//à l'instance du webdriver.
capabilities: { 'browserName': 'chrome', },
framework: 'jasmine2',
specs: ['./src/sli_sanitytests/San1_Check_
Sli_Homepage_is_Accessible_spec.js',
'./src/sli_sanitytests/San2_
Click_createButton_to_Open_Sli_CreateForm_page_spec.js',
'./src/sli_sanitytests/San3_
Create_Sli_reference_spec.js' ],
suites: {
smoke: ['./smoke/!*.spec.js'],
regression:['./regression/!*.spec.js'],
functional: ['./functional/!*.spec.js'],
all: ['./!*!/!*.spec.js'],
selected:['./functional/addcustomer.spec.js',
'./regression/openaccount.spec.js'],
},
// Options à passer à Jasmine
jasmineNodeOpts: {
//onComplete sera appelé juste avant la fermeture du driver.
onComplete: null,
// Si true, affiche les noms des spécifications.
isVerbose: true, // Si vrai, imprime les couleurs dans le terminal.
showColors: true, // Si vrai, inclure les traces de pile en
//cas d'échec.
includeStackTrace: true, // Délai par défaut en ms
//avant qu'un test échoue.
defaultTimeoutInterval: 80000
},
//enter code here
onPrepare:function() {
browser.ignoreSynchronization = true;
browser.driver.manage().window().maximize();
},
}
0 votes
Quelle version de protractor utilisez-vous? il semble que vous obteniez
une exception non capturée
qui peut être due à diverses raisons!0 votes
En espérant que cela aide quelqu'un d'autre... J'ai rencontré le même problème que l'auteur du post après une mise à jour de Windows sur ma machine. Il s'avère que réinstaller Protractor a résolu le problème. c'est-à-dire, exécutez d'abord
npm install protractor -g
, puiswebdriver-manager update
pour mettre à jour le pilote chrome.