File tree 7 files changed +50
-5
lines changed
selenium/webdriver/remote
7 files changed +50
-5
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,6 @@ jobs:
100
100
fail-fast : false
101
101
matrix :
102
102
include :
103
- - browser : safari
104
- os : macos
105
103
- browser : chrome
106
104
os : ubuntu
107
105
- browser : edge
@@ -116,3 +114,21 @@ jobs:
116
114
run : |
117
115
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:common-${{ matrix.browser }}-bidi
118
116
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-${{ matrix.browser }}
117
+
118
+ safari-tests :
119
+ name : Browser Tests
120
+ needs : build
121
+ uses : ./.github/workflows/bazel.yml
122
+ strategy :
123
+ fail-fast : false
124
+ matrix :
125
+ include :
126
+ - browser : safari
127
+ os : macos
128
+ with :
129
+ name : Integration Tests (${{ matrix.browser }}, ${{ matrix.os }})
130
+ browser : ${{ matrix.browser }}
131
+ os : ${{ matrix.os }}
132
+ cache-key : py-browser-${{ matrix.browser }}
133
+ run : |
134
+ bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-${{ matrix.browser }}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ attrs==23.2.0
3
3
certifi == 2023.11.17
4
4
cffi == 1.16.0
5
5
cryptography == 42.0.8
6
+ secretstorage == 3.3.3
6
7
debugpy == 1.8.7
7
8
filetype == 1.2.0
8
9
h11 == 0.14.0
Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ cryptography==42.0.8 \
208
208
# via
209
209
# -r py/requirements.txt
210
210
# pyopenssl
211
+ # secretstorage
211
212
debugpy==1.8.7 \
212
213
--hash=sha256:11ad72eb9ddb436afb8337891a986302e14944f0f755fd94e90d0d71e9100bba \
213
214
--hash=sha256:171899588bcd412151e593bd40d9907133a7622cd6ecdbdb75f89d1551df13c2 \
@@ -288,6 +289,10 @@ jaraco-classes==3.3.0 \
288
289
--hash=sha256:10afa92b6743f25c0cf5f37c6bb6e18e2c5bb84a16527ccfc0040ea377e7aaeb \
289
290
--hash=sha256:c063dd08e89217cee02c8d5e5ec560f2c8ce6cdc2fcdc2e68f7b2e5547ed3621
290
291
# via keyring
292
+ jeepney==0.8.0 \
293
+ --hash=sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806 \
294
+ --hash=sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755
295
+ # via secretstorage
291
296
keyring==24.3.0 \
292
297
--hash=sha256:4446d35d636e6a10b8bce7caa66913dd9eca5fd222ca03a3d42c38608ac30836 \
293
298
--hash=sha256:e730ecffd309658a08ee82535a3b5ec4b4c8669a9be11efb66249d8e0aeb9a25
@@ -512,6 +517,10 @@ rich==13.7.0 \
512
517
--hash=sha256:5cb5123b5cf9ee70584244246816e9114227e0b98ad9176eede6ad54bf5403fa \
513
518
--hash=sha256:6da14c108c4866ee9520bbffa71f6fe3962e193b7da68720583850cd4548e235
514
519
# via twine
520
+ secretstorage==3.3.3 \
521
+ --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \
522
+ --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99
523
+ # via -r py/requirements.txt
515
524
sniffio==1.3.1 \
516
525
--hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \
517
526
--hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc
Original file line number Diff line number Diff line change @@ -1057,6 +1057,12 @@ def start_devtools(self):
1057
1057
raise WebDriverException ("Unable to find url to connect to from capabilities" )
1058
1058
1059
1059
devtools = cdp .import_devtools (version )
1060
+ if self .caps ["browserName" ].lower () == "firefox" :
1061
+ warnings .warn (
1062
+ "CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi." ,
1063
+ DeprecationWarning ,
1064
+ stacklevel = 2 ,
1065
+ )
1060
1066
self ._websocket_connection = WebSocketConnection (ws_url )
1061
1067
targets = self ._websocket_connection .execute (devtools .target .get_targets ())
1062
1068
target_id = targets [0 ].target_id
Original file line number Diff line number Diff line change 21
21
22
22
@pytest .mark .xfail_safari
23
23
def test_check_console_messages (driver , pages ):
24
- devtools , connection = driver .start_devtools ()
24
+ with pytest .warns (None ) as record :
25
+ devtools , connection = driver .start_devtools ()
25
26
console_api_calls = []
26
27
28
+ if driver .caps ["browserName" ].lower () == "firefox" :
29
+ assert (
30
+ record [0 ].message .args [0 ]
31
+ == "CDP support for Firefox is deprecated and will be removed in future versions. Please switch to WebDriver BiDi."
32
+ )
33
+ else :
34
+ assert len (record ) == 0
35
+
27
36
connection .execute (devtools .runtime .enable ())
28
37
connection .on (devtools .runtime .ConsoleAPICalled , console_api_calls .append )
29
38
driver .execute_script ("console.log('I love cheese')" )
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ def test_log_output_as_filename() -> None:
27
27
log_file = "geckodriver.log"
28
28
service = Service (log_output = log_file )
29
29
try :
30
- driver = Firefox (service = service )
30
+ with pytest .warns (None ) as record :
31
+ driver = Firefox (service = service )
32
+ assert len (record ) == 0
31
33
with open (log_file ) as fp :
32
34
assert "geckodriver\t INFO\t Listening" in fp .readline ()
33
35
finally :
Original file line number Diff line number Diff line change 22
22
23
23
@pytest .fixture
24
24
def driver (options ):
25
- driver = webdriver .Remote (options = options )
25
+ with pytest .warns (None ) as record :
26
+ driver = webdriver .Remote (options = options )
27
+ assert len (record ) == 0
26
28
yield driver
27
29
driver .quit ()
28
30
You can’t perform that action at this time.
0 commit comments