Skip to content

Commit

Permalink
Merge pull request #1860 from emanlove/preconfigure-chrome-browser
Browse files Browse the repository at this point in the history
Preconfigure chrome browser
  • Loading branch information
emanlove authored Nov 1, 2023
2 parents f197a40 + 62e0d2b commit 036771b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: latest
id: setup-chrome
- run: |
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }}
${{ steps.setup-chrome.outputs.chrome-path }} --version
- name: Start xvfb
run: |
export DISPLAY=:99.0
Expand All @@ -36,6 +44,12 @@ jobs:
- name: Install RF ${{ matrix.rf-version }}
run: |
pip install -U --pre robotframework==${{ matrix.rf-version }}
- name: Install drivers via selenium-manager
run: |
SELENIUM_MANAGER_EXE=$(python -c 'from selenium.webdriver.common.selenium_manager import SeleniumManager; sm=SeleniumManager(); print(f"{str(sm.get_binary())}")')
echo "$SELENIUM_MANAGER_EXE"
echo "WEBDRIVERPATH=$($SELENIUM_MANAGER_EXE --browser chrome --debug | awk '/INFO[[:space:]]Driver path:/ {print $NF;exit}')" >> "$GITHUB_ENV"
echo "$WEBDRIVERPATH"
- name: Generate stub file for ${{ matrix.python-version }}
if: matrix.python-version != 'pypy-3.7'
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Library SeleniumLibrary event_firing_webdriver=${CURDIR}/../../resources/testlibs/MyListener.py
Resource resource_event_firing_webdriver.robot
Suite Setup Open Browser ${FRONT PAGE} ${BROWSER} alias=event_firing_webdriver
... remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
... remote_url=${REMOTE_URL} executable_path=%{WEBDRIVERPATH}
Suite Teardown Close All Browsers

*** Variables ***
Expand Down

0 comments on commit 036771b

Please sign in to comment.