Skip to content

Commit af3d6b9

Browse files
committed
Testing failure in setting window position with firefox
1 parent 5db0584 commit af3d6b9

File tree

4 files changed

+17
-176
lines changed

4 files changed

+17
-176
lines changed

.github/actions/setup-firefox/action.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ runs:
99
using: "composite"
1010
steps:
1111
- name: Setup Firefox
12-
uses: browser-actions/setup-firefox@latest
13-
with:
14-
firefox-version: ${{ inputs.version }}
15-
- name: Setup geckodriver
16-
uses: browser-actions/setup-geckodriver@latest
12+
# uses: browser-actions/setup-firefox@latest
13+
# with:
14+
# firefox-version: ${{ inputs.version }}
15+
# with window changes
16+
run: wget https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/GxXrnY5kSaqpP83rXCLBrA/runs/0/artifacts/public/build/target.tar.bz2 -O firefox.tar.gz && mkdir -p /opt/hostedtoolcache/firefox/latest/x64 && tar xvf firefox.tar.gz --strip-components=1 -C /opt/hostedtoolcache/firefox/latest/x64/
17+
shell: bash
18+
- name: Check Firefox
19+
run: /opt/hostedtoolcache/firefox/latest/x64/firefox --full-version
20+
shell: bash
21+
- name: Check GeckoDriver
22+
run: geckodriver --version
23+
shell: bash

.github/workflows/ci-python.yml

Lines changed: 1 addition & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -20,179 +20,9 @@ jobs:
2020
with:
2121
bazel-target-prefix: '//py'
2222

23-
tox_flake8:
24-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
25-
needs: check_workflow
26-
runs-on: ubuntu-latest
27-
steps:
28-
- name: Checkout source tree
29-
uses: actions/checkout@v2
30-
- name: Set up Python 3.7
31-
uses: actions/setup-python@v2
32-
with:
33-
python-version: 3.7.10
34-
- name: Install dependencies
35-
run: |
36-
python -m pip install --upgrade pip
37-
pip install tox==2.4.1
38-
- name: Test with tox
39-
run: tox -c py/tox.ini
40-
env:
41-
TOXENV: flake8
42-
43-
tox_docs:
44-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
45-
needs: check_workflow
46-
runs-on: ubuntu-latest
47-
steps:
48-
- name: Checkout source tree
49-
uses: actions/checkout@v2
50-
- name: Set up Python 3.7
51-
uses: actions/setup-python@v2
52-
with:
53-
python-version: 3.7.10
54-
- name: Install dependencies
55-
run: |
56-
python -m pip install --upgrade pip
57-
pip install tox==2.4.1
58-
- name: Test with tox
59-
run: tox -c py/tox.ini
60-
env:
61-
TOXENV: docs
62-
63-
tox_mypy:
64-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
65-
needs: check_workflow
66-
runs-on: ubuntu-latest
67-
steps:
68-
- name: Checkout source tree
69-
uses: actions/checkout@v2
70-
- name: Set up Python 3.7
71-
uses: actions/setup-python@v2
72-
with:
73-
python-version: 3.7.9
74-
- name: Install dependencies
75-
run: |
76-
python -m pip install --upgrade pip
77-
pip install tox==2.4.1
78-
- name: Test with tox
79-
run: |
80-
tox -c py/tox.ini -- --cobertura-xml-report ci || true
81-
bash <(curl -s https://codecov.io/bash) -f py/ci/cobertura.xml
82-
env:
83-
TOXENV: mypy
84-
85-
unit_tests:
86-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
87-
needs: check_workflow
88-
runs-on: ubuntu-latest
89-
steps:
90-
- name: Checkout source tree
91-
uses: actions/checkout@v2
92-
- name: Cache Bazel artifacts
93-
uses: actions/cache@v2
94-
with:
95-
path: |
96-
~/.cache/bazel-disk
97-
~/.cache/bazel-repo
98-
key: ${{ runner.os }}-bazel-python-unit-tests-${{ hashFiles('**/BUILD.bazel') }}
99-
restore-keys: |
100-
${{ runner.os }}-bazel-python-unit-tests-
101-
- name: Setup bazelisk
102-
uses: ./.github/actions/setup-bazelisk
103-
- name: Set up Python 3.7
104-
uses: actions/setup-python@v2
105-
with:
106-
python-version: 3.7.10
107-
- name: Setup Java
108-
uses: actions/setup-java@v1
109-
with:
110-
java-version: '11'
111-
- name: Run unit tests
112-
uses: ./.github/actions/bazel
113-
with:
114-
command: test //py:unit
115-
116-
chrome_tests:
117-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
118-
needs: [ check_workflow, unit_tests ]
119-
runs-on: ubuntu-latest
120-
steps:
121-
- name: Checkout source tree
122-
uses: actions/checkout@v2
123-
- name: Cache Bazel artifacts
124-
uses: actions/cache@v2
125-
with:
126-
path: |
127-
~/.cache/bazel-disk
128-
~/.cache/bazel-repo
129-
key: ${{ runner.os }}-bazel-chrome-tests-${{ hashFiles('**/BUILD.bazel') }}
130-
restore-keys: |
131-
${{ runner.os }}-bazel-chrome-tests-
132-
${{ runner.os }}-bazel-python-unit-tests-
133-
- name: Setup bazelisk
134-
uses: ./.github/actions/setup-bazelisk
135-
- name: Set up Python 3.7
136-
uses: actions/setup-python@v2
137-
with:
138-
python-version: 3.7.10
139-
- name: Setup Java
140-
uses: actions/setup-java@v1
141-
with:
142-
java-version: '11'
143-
- name: Setup Chrome and ChromeDriver
144-
uses: ./.github/actions/setup-chrome
145-
- name: Start XVFB
146-
run: Xvfb :99 &
147-
- name: Run browser tests in Chrome
148-
uses: ./.github/actions/bazel-test
149-
with:
150-
query: //py:test-chrome
151-
attempts: 3
152-
env:
153-
DISPLAY: :99
154-
155-
firefox_tests_remote:
156-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
157-
needs: [ check_workflow, unit_tests ]
158-
runs-on: ubuntu-latest
159-
steps:
160-
- name: Checkout source tree
161-
uses: actions/checkout@v2
162-
- name: Cache Bazel artifacts
163-
uses: actions/cache@v2
164-
with:
165-
path: |
166-
~/.cache/bazel-disk
167-
~/.cache/bazel-repo
168-
key: ${{ runner.os }}-bazel-firefox-tests-${{ hashFiles('**/BUILD.bazel') }}
169-
restore-keys: |
170-
${{ runner.os }}-bazel-firefox-tests-
171-
${{ runner.os }}-bazel-python-unit-tests-
172-
- name: Setup bazelisk
173-
uses: ./.github/actions/setup-bazelisk
174-
- name: Set up Python 3.7
175-
uses: actions/setup-python@v2
176-
with:
177-
python-version: 3.7.10
178-
- name: Setup Java
179-
uses: actions/setup-java@v1
180-
with:
181-
java-version: '11'
182-
- name: Setup Firefox and GeckoDriver
183-
uses: ./.github/actions/setup-firefox
184-
- name: Start XVFB
185-
run: Xvfb :99 &
186-
- name: Run browser tests in Firefox (Remote)
187-
uses: ./.github/actions/bazel
188-
with:
189-
command: test --jobs 1 //py:test-remote
190-
env:
191-
DISPLAY: :99
192-
19323
firefox_tests:
19424
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
195-
needs: [ check_workflow, unit_tests ]
25+
needs: [ check_workflow ]
19626
runs-on: ubuntu-latest
19727
steps:
19828
- name: Checkout source tree

py/selenium/webdriver/firefox/service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def __init__(self, executable_path: str = DEFAULT_EXECUTABLE_PATH,
5656
self.service_args.append("--websocket-port")
5757
self.service_args.append("%d" % utils.free_port())
5858

59+
self.service_args.append("-vv")
60+
5961
# Set the webdriver port
6062
self.service_args.append("--port")
6163
self.service_args.append("%d" % self.port)

py/selenium/webdriver/firefox/webdriver.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ def __init__(self, firefox_profile=None, firefox_binary=None,
171171
log_path=service_log_path)
172172
self.service.start()
173173

174+
os.environ["MOZ_LOG"] = "Widget:5"
175+
174176
executor = FirefoxRemoteConnection(
175177
remote_server_addr=self.service.service_url,
176178
ignore_proxy=options._ignore_local_proxy)

0 commit comments

Comments
 (0)