无法使用量角器在Chrome浏览器中打开UI

时间:2018-05-10 11:31:31

标签: proxy protractor config

运行量角器代码时,我在cmd提示符中遇到了下面提到的错误。 浏览器正在启动但无法打开UI。 我在我的测试中添加了一个wait和print语句,该语句执行正常。

Z:\user\Projects\Sample>protractor config\protractor.conf.js
(node:6516) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[15:05:37] I/direct - Using ChromeDriver directly...
[15:05:37] I/launcher - Running 1 instances of WebDriver
[9884:6652:0510/150538.243:ERROR:configuration_policy_handler_list.cc(92)] Unknown policy: AlwaysAuthorizePlugins
[9884:6652:0510/150538.244:ERROR:configuration_policy_handler_list.cc(92)] Unknown policy: DisablePluginFinder
[9884:6652:0510/150538.244:ERROR:configuration_policy_handler_list.cc(92)] Unknown policy: DnsPrefetchingEnabled
[9884:6652:0510/150538.324:ERROR:configuration_policy_handler_list.cc(92)] Unknown policy: AlwaysAuthorizePlugins
[9884:6652:0510/150538.324:ERROR:configuration_policy_handler_list.cc(92)] Unknown policy: DisablePluginFinder
[9884:6652:0510/150538.324:ERROR:configuration_policy_handler_list.cc(92)] Unknown policy: DnsPrefetchingEnabled

DevTools listening on ws://127.0.0.1:12844/devtools/browser/4545c785-9b04-4b0c-b1ce-afbe1be29e99
[6624:1784:0510/150538.477:ERROR:gl_surface_egl.cc(840)] eglInitialize D3D11 failed with error EGL_NOT_INITIALIZED, trying next display type
Jasmine started
Sleep for 5 secs
Print text: Test1

Executed 0 of 0 specs SUCCESS in 0.004 sec.
[15:05:39] I/launcher - 0 instance(s) of WebDriver still running
[15:05:39] I/launcher - chrome #01 passed

我删除了“

”下的密钥“1”
HKEY_LOCAL_MACHINE>SOFTWARE>Policies>Google>Chrome>ExtensionInstallBlacklist

正如我的一位同事所建议的那样。这是由于某些公司政策/代理造成的吗? 我的量角器配置文件是:

const { SpecReporter } = require('jasmine-spec-reporter');

exports.config = {
  seleniumAddress: "http://localhost:4545/wd/hub",
  allScriptsTimeout: 11000,
  specs: [
    '../e2e/**/*.e2e-spec.ts'
  ],
  chromeDriver: 'C:\\Users\\..\\bin\\node_modules\\protractor\\node_modules\\webdriver-manager\\selenium\\chromedriver_2.36.exe',
  capabilities: {
  browserName: 'chrome',
  chromeOptions: {
   binary: process.env.CHROME_BIN
  }
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
  },
  beforeLaunch: function() {
    require('ts-node').register({
      project: 'e2e/tsconfig.e2e.json'
    });
  },
  onPrepare() {
    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
  }
};

我在这里错过了什么吗?

0 个答案:

没有答案