File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
examples/python/tests/browsers Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11import os
22import re
33import subprocess
4+
45import pytest
56from selenium import webdriver
67from selenium .webdriver .common .by import By
78
9+
810def test_basic_options ():
911 options = get_default_chrome_options ()
1012 driver = webdriver .Chrome (options = options )
@@ -189,6 +191,7 @@ def test_get_browser_logs():
189191 assert any ("I am console error" in log ['message' ] for log in logs ), "No matching log message found."
190192 driver .quit ()
191193
194+
192195def get_default_chrome_options ():
193196 options = webdriver .ChromeOptions ()
194197 options .add_argument ("--no-sandbox" )
Original file line number Diff line number Diff line change 11import os
22import re
33import subprocess
4+
45import pytest
56from selenium import webdriver
67from selenium .webdriver .common .by import By
78
9+
810def test_basic_options ():
911 options = get_default_edge_options ()
12+
1013 driver = webdriver .Edge (options = options )
1114
1215 driver .quit ()
@@ -73,7 +76,7 @@ def test_log_to_file(log_path):
7376 driver = webdriver .Edge (service = service )
7477
7578 with open (log_path , 'r' ) as fp :
76- assert "Starting Microsoft Edge WebDriver " in fp .readline ()
79+ assert "Starting" in fp .readline ()
7780
7881 driver .quit ()
7982
@@ -84,7 +87,7 @@ def test_log_to_stdout(capfd):
8487 driver = webdriver .Edge (service = service )
8588
8689 out , err = capfd .readouterr ()
87- assert "Starting Microsoft Edge WebDriver " in out
90+ assert "Starting" in out
8891
8992 driver .quit ()
9093
@@ -189,6 +192,7 @@ def test_get_browser_logs():
189192 assert any ("I am console error" in log ['message' ] for log in logs ), "No matching log message found."
190193 driver .quit ()
191194
195+
192196def get_default_edge_options ():
193197 options = webdriver .EdgeOptions ()
194198 options .add_argument ("--no-sandbox" )
You can’t perform that action at this time.
0 commit comments