WIP: Replace PhantomJS with headless Chrome for Rspec and Spinach tests
To run:
You need to download ChromeDriver 2.31 and install it: http://chromedriver.storage.googleapis.com/index.html?path=2.31/
Current Issues:
-
unknown error: an X display is required for keycode conversions, consider using Xvfb
(e.g. https://gitlab.com/gitlab-org/gitlab-ce/builds/18894684).
Bug report: https://bugs.chromium.org/p/chromedriver/issues/detail?id=1772. Some users mention compiling with use_ozone
on Chrome and ChromeDriver solves this problem.
Alternatives: Use xvfb (https://github.com/Automattic/wp-e2e-tests/issues/515#issuecomment-301165065)
-
https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/27344249: Selenium does not support status_code
: https://stackoverflow.com/questions/7908907/how-to-test-the-response-code-with-capybara-selenium -
https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/28861088: Selenium does not support response_headers
-
https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/28877991: Selenium does not support network_traffic
: https://stackoverflow.com/questions/12034013/is-there-any-way-to-log-http-requests-responses-using-selenium-webdriver-firefo/12036058#12036058
Be sure to read https://makandracards.com/makandra/7617-change-how-capybara-sees-or-ignores-hidden-elements about how Chrome/Selenium behaves differently with hidden elements.
Closes #30876 (moved)