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();
});
The codecept.json
config is pretty standard:
{
"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:
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:
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.
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.
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.
Take a look at this:
https://github.com/karma-runner/karma-chrome-launcher/issues/183#issuecomment-401820926
You might find a way to pass the --disable-gpu
flag. That helped me with my own issue:
Chrome not rendering fonts when opened in terminal or run by webriver
来源:https://stackoverflow.com/questions/50833492/automated-chrome-hides-text-in-codeceptjs-webdriverio-test