本文介绍了"Runtime.executionContextCreated具有无效的'context'";我运行量角器时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行量角器时,我在错误"下面得到此信息.下面是我的Webstorm控制台中显示的错误.

I am getting this below Error while i run my protractor. And below is the error as shown in my webstorm console.

我的配置js如下所示:

     exports.config = { 
          directConnect: true, // Capabilities to be passed
          //to the webdriver instance. 
         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 to be passed to Jasmine
                  jasmineNodeOpts: {
                 //onComplete will be called just before the driver quits.                                
                  onComplete: null, 
                 // If true, display spec names. 
                 isVerbose: true, // If true,print colors to the terminal. 
                 showColors: true, // If true, include stack traces in       
                                   //failures. 
                 includeStackTrace: true, // Default time to wait in ms  
                                         //before a test fails.  
                 defaultTimeoutInterval: 80000 
                             },
                //enter code here 
               onPrepare:function() { 
                   browser.ignoreSynchronization = true;
                   browser.driver.manage().window().maximize(); 
               },
             }

推荐答案

首先卸载chrome浏览器,然后重新安装.量角器将不会抛出任何此类错误.

First of all uninstall your chrome browser and reinstall it. That`s it protractor will not throw any such errors.

我什至不知道为什么会发生这种情况,以及出于什么原因看起来有些奇怪,但是是唯一的解决方案是卸载chrome浏览器并重新安装.

I even don`t know why this happened and for what reasons looks bit strange but yes the only solution is uninstall the chrome browser and reinstall it.

npm卸载webdriver-manager -g npm安装webdriver-manager -g

npm uninstall webdriver-manager -g npm install webdriver-manager -g

这篇关于"Runtime.executionContextCreated具有无效的'context'";我运行量角器时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 04:35