mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
Ci selenium fix (#863)
* Added --no-sandbox argument to chrome on travis * Added xvfb screen display settings * Updated chromedriver version
This commit is contained in:
parent
94e62cb63c
commit
ac6ae09a05
@ -51,6 +51,7 @@ public class SeleniumDriver extends ExternalResource {
|
||||
ChromeOptions chromeOptions = new ChromeOptions();
|
||||
chromeOptions.setBinary("/usr/bin/google-chrome-stable");
|
||||
chromeOptions.setHeadless(true);
|
||||
chromeOptions.addArguments("--no-sandbox");
|
||||
chromeOptions.setCapability(SUPPORTS_JAVASCRIPT, true);
|
||||
|
||||
return new ChromeDriver(chromeOptions);
|
||||
|
@ -1,5 +1,10 @@
|
||||
# Start Xvfb screen
|
||||
export DISPLAY=:99.0
|
||||
sh -e /etc/init.d/xvfb start
|
||||
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
|
||||
|
||||
# Install chromedriver
|
||||
wget -N http://chromedriver.storage.googleapis.com/2.30/chromedriver_linux64.zip -P ~/
|
||||
wget -N https://chromedriver.storage.googleapis.com/2.45/chromedriver_linux64.zip -P ~/
|
||||
unzip ~/chromedriver_linux64.zip -d ~/
|
||||
rm ~/chromedriver_linux64.zip
|
||||
sudo chmod -R u=rwx,g=rwx /usr/bin/google-chrome-stable
|
||||
|
Loading…
Reference in New Issue
Block a user