Skip to content

Commit 3967426

Browse files
committed
trying new headless mode parameter
1 parent 59dd719 commit 3967426

2 files changed

Lines changed: 14 additions & 18 deletions

File tree

.travis.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ before_install:
3232
- sudo apt-get -y install python3-pip python3-setuptools apache2-utils python3-venv jq
3333
- mkdir -p $HOME/.local/bin
3434
- CHROME_VERSION=$(google-chrome --version | awk '{print $3}')
35-
- 'echo "Installed Chrome version: $CHROME_VERSION"'
3635
- CHROMEDRIVER_VERSION=$(curl -s "https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json" | jq -r --arg ver "$CHROME_VERSION" '.versions[] | select(.version == $ver) | .version' | head -1)
37-
- if [ -z "$CHROMEDRIVER_VERSION" ]; then echo "Exact version not found, using Chrome version directly"; CHROMEDRIVER_VERSION=$CHROME_VERSION; fi
38-
- 'echo "Using ChromeDriver version: $CHROMEDRIVER_VERSION"'
3936
- wget https://storage.googleapis.com/chrome-for-testing-public/${CHROMEDRIVER_VERSION}/linux64/chromedriver-linux64.zip
4037
- unzip chromedriver-linux64.zip
4138
- mv chromedriver-linux64/chromedriver $HOME/.local/bin/chromedriver
@@ -44,11 +41,11 @@ before_install:
4441
- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.30.1/buildx-v0.30.1.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
4542
- chmod a+x ~/.docker/cli-plugins/docker-buildx
4643
install:
47-
- pip3 install -r requirements.txt
48-
- pip3 install pyasn1 --upgrade
49-
- pip3 install ldap3 parameterized bcrypt
50-
- pip3 install requests --upgrade
51-
- pip3 install awscli
44+
# - pip3 install -r requirements.txt
45+
# - pip3 install pyasn1 --upgrade
46+
# - pip3 install ldap3 parameterized bcrypt
47+
# - pip3 install requests --upgrade
48+
# - pip3 install awscli
5249
- cd web-src
5350
- npm install
5451
- npm install allure-commandline --save-dev
@@ -57,12 +54,12 @@ install:
5754
- e2e_venv/bin/pip install -r src/e2e_tests/requirements.txt
5855
before_script:
5956
- cd src
60-
- python3 -m unittest discover -s tests -p "*.py" -t .
57+
# - python3 -m unittest discover -s tests -p "*.py" -t .
6158
- cd ../web-src
62-
- npm run test:unit-ci
59+
# - npm run test:unit-ci
6360
- cd ..
6461
script:
65-
- python3 tools/build.py
62+
# - python3 tools/build.py
6663
- tools/run_e2e_tests.sh
6764
after_script:
6865
- tools/report_allure.sh

src/e2e_tests/conftest.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import json
2-
import time
3-
41
import allure
2+
import json
53
import pytest
4+
import time
65
from selenium.webdriver import Chrome, Firefox, Ie
76
from selenium.webdriver.chrome.options import Options as ChromeOptions
87
from selenium.webdriver.firefox.options import Options as FirefoxOptions
@@ -50,15 +49,15 @@ def scripts():
5049
def browser(config_browser, config_headless_mode, request):
5150
if config_browser == 'chrome':
5251
options = ChromeOptions()
53-
options.headless = config_headless_mode
52+
if config_headless_mode:
53+
options.add_argument('--headless=new')
5454
options.add_argument('--no-sandbox')
5555
options.add_argument('--disable-dev-shm-usage')
56-
# mobile_emulation = {"deviceName": "Nexus 5"}
57-
# options.add_experimental_option("mobileEmulation", mobile_emulation)
5856
driver = Chrome(options=options)
5957
elif config_browser == 'firefox':
6058
options = FirefoxOptions()
61-
options.headless = config_headless_mode
59+
if config_headless_mode:
60+
options.add_argument('--headless=new')
6261
options.add_argument('--no-sandbox')
6362
options.add_argument('--disable-dev-shm-usage')
6463
driver = Firefox(options=options)

0 commit comments

Comments
 (0)