Skip to content

Commit ec5bb9c

Browse files
authored
Merge pull request #1829 from seleniumbase/updates-and-fixes
Updates and fixes
2 parents 4e827a1 + 0159668 commit ec5bb9c

20 files changed

+212
-85
lines changed

examples/tour_examples/bootstrap_google_tour.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,18 @@ def test_google_tour(self):
6161
self.add_tour_step(
6262
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
6363
)
64-
self.add_tour_step(
65-
"Use the Menu button to see more options.",
66-
'button[jsaction*="settings.open;"]',
67-
alignment="right",
68-
)
64+
if self.is_element_visible('button[jsaction*="settings.open;"]'):
65+
self.add_tour_step(
66+
"Use the Menu button to see more options.",
67+
'button[jsaction*="settings.open;"]',
68+
alignment="right",
69+
)
70+
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
71+
self.add_tour_step(
72+
"Use the Menu button to see more options.",
73+
'button[jsaction="navigationrail.more"]',
74+
alignment="right",
75+
)
6976
self.add_tour_step(
7077
"Or click here to see more Google apps.",
7178
'[title="Google apps"]',

examples/tour_examples/bootstrap_xkcd_tour.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ def test_bootstrap_tour(self):
1616
self.add_tour_step("Learn about the author here.", 'a[rel="author"]')
1717
self.add_tour_step("Click for a random comic.", 'a[href*="/random/"]')
1818
self.add_tour_step("Thanks for taking this tour!")
19-
self.export_tour(filename="bootstrap_xkcd_tour.js") # Exports the tour
20-
self.play_tour() # Plays the tour
19+
self.export_tour(filename="bootstrap_xkcd_tour.js")
20+
self.play_tour()

examples/tour_examples/driverjs_maps_tour.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,18 @@ def test_create_tour(self):
3737
self.add_tour_step(
3838
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
3939
)
40-
self.add_tour_step(
41-
"Use the Menu button to see more options.",
42-
'button[jsaction*="settings.open;"]',
43-
alignment="right",
44-
)
40+
if self.is_element_visible('button[jsaction*="settings.open;"]'):
41+
self.add_tour_step(
42+
"Use the Menu button to see more options.",
43+
'button[jsaction*="settings.open;"]',
44+
alignment="right",
45+
)
46+
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
47+
self.add_tour_step(
48+
"Use the Menu button to see more options.",
49+
'button[jsaction="navigationrail.more"]',
50+
alignment="right",
51+
)
4552
self.add_tour_step(
4653
"Or click here to see more Google apps.",
4754
'[title="Google apps"]',

examples/tour_examples/google_tour.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,18 @@ def test_google_tour(self):
6969
self.add_tour_step(
7070
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
7171
)
72-
self.add_tour_step(
73-
"Use the Menu button to see more options.",
74-
'button[jsaction*="settings.open;"]',
75-
alignment="right",
76-
)
72+
if self.is_element_visible('button[jsaction*="settings.open;"]'):
73+
self.add_tour_step(
74+
"Use the Menu button to see more options.",
75+
'button[jsaction*="settings.open;"]',
76+
alignment="right",
77+
)
78+
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
79+
self.add_tour_step(
80+
"Use the Menu button to see more options.",
81+
'button[jsaction="navigationrail.more"]',
82+
alignment="right",
83+
)
7784
self.add_tour_step(
7885
"Or click here to see more Google apps.",
7986
'[title="Google apps"]',

examples/tour_examples/hopscotch_google_tour.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,18 @@ def test_google_tour(self):
6161
self.add_tour_step(
6262
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
6363
)
64-
self.add_tour_step(
65-
"Use the Menu button to see more options.",
66-
'button[jsaction*="settings.open;"]',
67-
alignment="right",
68-
)
64+
if self.is_element_visible('button[jsaction*="settings.open;"]'):
65+
self.add_tour_step(
66+
"Use the Menu button to see more options.",
67+
'button[jsaction*="settings.open;"]',
68+
alignment="right",
69+
)
70+
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
71+
self.add_tour_step(
72+
"Use the Menu button to see more options.",
73+
'button[jsaction="navigationrail.more"]',
74+
alignment="right",
75+
)
6976
self.add_tour_step(
7077
"Or click here to see more Google apps.",
7178
'[title="Google apps"]',

examples/tour_examples/introjs_google_tour.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,18 @@ def test_google_tour(self):
6262
self.add_tour_step(
6363
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
6464
)
65-
self.add_tour_step(
66-
"Use the Menu button to see more options.",
67-
'button[jsaction*="settings.open;"]',
68-
alignment="right",
69-
)
65+
if self.is_element_visible('button[jsaction*="settings.open;"]'):
66+
self.add_tour_step(
67+
"Use the Menu button to see more options.",
68+
'button[jsaction*="settings.open;"]',
69+
alignment="right",
70+
)
71+
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
72+
self.add_tour_step(
73+
"Use the Menu button to see more options.",
74+
'button[jsaction="navigationrail.more"]',
75+
alignment="right",
76+
)
7077
self.add_tour_step(
7178
"Or click here to see more Google apps.",
7279
'[title="Google apps"]',

examples/tour_examples/maps_introjs_tour.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,18 @@ def test_google_maps_tour(self):
3737
self.add_tour_step(
3838
"Or click here to zoom out.", "#widget-zoom-out", alignment="left"
3939
)
40-
self.add_tour_step(
41-
"Use the Menu button to see more options.",
42-
'button[jsaction*="settings.open;"]',
43-
alignment="right",
44-
)
40+
if self.is_element_visible('button[jsaction*="settings.open;"]'):
41+
self.add_tour_step(
42+
"Use the Menu button to see more options.",
43+
'button[jsaction*="settings.open;"]',
44+
alignment="right",
45+
)
46+
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
47+
self.add_tour_step(
48+
"Use the Menu button to see more options.",
49+
'button[jsaction="navigationrail.more"]',
50+
alignment="right",
51+
)
4552
self.add_tour_step(
4653
"Or click here to see more Google apps.",
4754
'[title="Google apps"]',

examples/tour_examples/shepherd_google_tour.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,18 @@ def test_google_tour(self):
6565
alignment="left",
6666
theme="light",
6767
)
68-
self.add_tour_step(
69-
"Use the Menu button to see more options.",
70-
'button[jsaction*="settings.open;"]',
71-
alignment="right",
72-
)
68+
if self.is_element_visible('button[jsaction*="settings.open;"]'):
69+
self.add_tour_step(
70+
"Use the Menu button to see more options.",
71+
'button[jsaction*="settings.open;"]',
72+
alignment="right",
73+
)
74+
elif self.is_element_visible('button[jsaction="navigationrail.more"]'):
75+
self.add_tour_step(
76+
"Use the Menu button to see more options.",
77+
'button[jsaction="navigationrail.more"]',
78+
alignment="right",
79+
)
7380
self.add_tour_step(
7481
"Or click here to see more Google apps.",
7582
'[title="Google apps"]',

examples/tour_examples/xkcd_tour.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ def test_create_tour(self):
1717
self.add_tour_step("Click here for the license.", 'a[rel="license"]')
1818
self.add_tour_step("Click for a random comic.", 'a[href*="/random/"]')
1919
self.add_tour_step("Thanks for taking this tour!")
20-
self.export_tour(filename="xkcd_tour.js") # Exports the tour
21-
self.play_tour() # Plays the tour
20+
self.export_tour(filename="xkcd_tour.js")
21+
self.play_tour()

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ nav:
130130
- 🎞️ Presenter Demo: https://seleniumbase.io/other/presenter.html
131131
- 📊 Chart Maker Demo: https://seleniumbase.io/other/chart_presentation.html
132132
- ⚙️ Python Virtual Envs: https://seleniumbase.io/other/py_virtual_envs.html
133+
- 🔰 Fundamentals Demo: https://seleniumbase.io/other/fundamentals.html
133134
- Demo Pages:
134135
- 🍵 Coffee Cart (Test App): https://seleniumbase.io/coffee/
135136
- 📑 Demo Page (Test Page): https://seleniumbase.io/demo_page

mkdocs_build/requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Jinja2==3.1.2
1313
click==8.1.3
1414
ghp-import==2.1.0
1515
readme-renderer==37.3
16-
pymdown-extensions==9.10
17-
importlib-metadata==6.1.0
16+
pymdown-extensions==9.11
17+
importlib-metadata==6.2.0
1818
pipdeptree==2.7.0
1919
bleach==6.0.0
2020
lunr==0.6.2
@@ -27,7 +27,7 @@ cssselect2==0.7.0
2727
tinycss2==1.2.1
2828
defusedxml==0.7.1
2929
mkdocs==1.4.2
30-
mkdocs-material==9.1.4
30+
mkdocs-material==9.1.6
3131
mkdocs-exclude-search==0.6.5
3232
mkdocs-simple-hooks==0.1.5
3333
mkdocs-material-extensions==1.1.1

requirements.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pip>=23.0.1;python_version>="3.7"
33
packaging>=21.3;python_version<"3.7"
44
packaging>=23.0;python_version>="3.7"
55
setuptools>=59.6.0;python_version<"3.7"
6-
setuptools>=67.6.0;python_version>="3.7"
6+
setuptools>=67.6.1;python_version>="3.7"
77
keyring>=23.4.1;python_version<"3.8"
88
keyring>=23.13.1;python_version>="3.8"
99
tomli>=1.2.3;python_version<"3.7"
@@ -17,10 +17,11 @@ attrs>=22.2.0;python_version>="3.7"
1717
PyYAML>=6.0
1818
certifi>=2022.12.7
1919
filelock>=3.4.1;python_version<"3.7"
20-
filelock>=3.10.7;python_version>="3.7"
20+
filelock>=3.11.0;python_version>="3.7"
2121
platformdirs>=2.4.0;python_version<"3.7"
2222
platformdirs>=3.2.0;python_version>="3.7"
2323
pyparsing>=3.0.7;python_version<"3.7"
24+
pyparsing>=3.0.9;python_version>="3.7"
2425
zipp==3.6.0;python_version<"3.7"
2526
zipp>=3.15.0;python_version>="3.7"
2627
more-itertools==8.14.0;python_version<"3.7"
@@ -42,7 +43,6 @@ h11==0.14.0;python_version>="3.7"
4243
outcome==1.2.0;python_version>="3.7"
4344
trio==0.22.0;python_version>="3.7"
4445
trio-websocket==0.10.2;python_version>="3.7"
45-
websockets==10.4;python_version>="3.7"
4646
pyopenssl==23.1.1;python_version>="3.7"
4747
wsproto==1.2.0;python_version>="3.7"
4848
selenium==3.141.0;python_version<"3.7"
@@ -59,7 +59,7 @@ iniconfig==2.0.0;python_version>="3.7"
5959
pluggy==1.0.0
6060
py==1.11.0
6161
pytest==7.0.1;python_version<"3.7"
62-
pytest==7.2.2;python_version>="3.7"
62+
pytest==7.3.0;python_version>="3.7"
6363
pytest-forked==1.4.0;python_version<"3.7"
6464
pytest-forked==1.6.0;python_version>="3.7"
6565
pytest-html==2.0.1
@@ -76,7 +76,7 @@ sbvirtualdisplay==1.2.0
7676
behave==1.2.6
7777
soupsieve==2.3.2.post1;python_version<"3.7"
7878
soupsieve==2.4;python_version>="3.7"
79-
beautifulsoup4==4.12.0
79+
beautifulsoup4==4.12.2
8080
cryptography==36.0.2;python_version<"3.7"
8181
cryptography==40.0.1;python_version>="3.7"
8282
pygments==2.14.0
@@ -103,7 +103,7 @@ rich==13.3.3;python_version>="3.7"
103103
# ("pip install -r requirements.txt" also installs this, but "pip install -e ." won't.)
104104

105105
coverage==6.2;python_version<"3.7"
106-
coverage==7.2.2;python_version>="3.7"
106+
coverage==7.2.3;python_version>="3.7"
107107
pytest-cov==4.0.0
108108
flake8==5.0.4;python_version<"3.9"
109109
flake8==6.0.0;python_version>="3.9"

seleniumbase/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.13.21"
2+
__version__ = "4.13.22"

seleniumbase/core/browser_launcher.py

+8
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,14 @@ def _set_chrome_options(
711711
chromium_arg_item = "-" + chromium_arg_item
712712
else:
713713
chromium_arg_item = "--" + chromium_arg_item
714+
if "remote-debugging-port=" in chromium_arg_item:
715+
try:
716+
# Extra processing for UC Mode
717+
chrome_options._remote_debugging_port = int(
718+
chromium_arg_item.split("remote-debugging-port=")[1]
719+
)
720+
except Exception:
721+
pass
714722
if len(chromium_arg_item) >= 3:
715723
chrome_options.add_argument(chromium_arg_item)
716724
if devtools and not headless:

0 commit comments

Comments
 (0)