自动化的Chrome在CodeceptJS WebdriverIO测试中隐藏文本 [英] Automated Chrome hides text in CodeceptJS WebdriverIO test
问题描述
我重新安装了Chrome版本67.0.3396.87,并遵循了 https://codecept.io/quickstart/初始化项目并创建以下测试:
I have a fresh install of Chrome Version 67.0.3396.87 and followed the https://codecept.io/quickstart/ to init a project and create the following test:
Feature('Hidden Text');
Scenario('test something', (I) => {
I.amOnPage('/');
pause();
});
codecept.json
配置非常标准:
{
"tests": "./*_test.js",
"timeout": 10000,
"output": "./output",
"helpers": {
"WebDriverIO": {
"url": "https://codecept.io",
"browser": "chrome"
}
},
"include": {
"I": "./steps_file.js"
},
"bootstrap": false,
"mocha": {},
"name": "chrome-missing-text"
}
运行测试时,所有文本都被隐藏:
When I run the test all text is hidden:
有趣的是,这种行为也适用于chrome设置本身(也是开发工具),但是我可以选择并复制隐藏"文本并将其成功粘贴:
Interestingly this behaviour also applies to the chrome settings itself (also dev tools), but I can select and copy the "hidden" text and paste it sucessfully:
我尝试通过selenium-standalone start
运行硒独立版,该版本运行硒独立版3.8.1和ChromeDriver 2.37.544337,还下载了最新的硒独立版3.12.0和ChromeDriver 2.4.0,通过手动启动java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone-3.12.0.jar
,它并没有改变Chrome可视地隐藏所有文本的结果.
I tried to run selenium-standalone via selenium-standalone start
, this runs selenium-standalone version 3.8.1 and ChromeDriver 2.37.544337 and also with latest selenium-standalone version 3.12.0 and ChromeDriver 2.4.0 downloaded, started manually via java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone-3.12.0.jar
, it did not changed the result that Chrome hides all text visually.
我在Mac OS X 10.13.5上.
I am on Mac OS X 10.13.5.
我还能采取什么措施对&解决问题?
What else can I do to troubleshoot & fix the issue?
我不确定在哪里问这个问题,因为我不确定堆栈的哪一部分导致了问题.
I am unsure where to ask this question since I am not sure which part of the stack is causing the problem.
推荐答案
似乎与OS X 10.13.5中的mac os终端有关.从第三方终端(例如,使用IntelliJ终端)启动硒服务器(或特定测试),不会发生此问题.
Seems to be an issue with the mac os terminal in OS X 10.13.5. Starting the selenium server (or the specific test) out of an 3rd party terminal (e.g. using the IntelliJ terminal), the problem does not occur.
这篇关于自动化的Chrome在CodeceptJS WebdriverIO测试中隐藏文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!