Skip to content

Commit 7859ed4

Browse files
authored
Merge pull request #2484 from seleniumbase/refresh-js-and-python-dependencies
Refresh JS and Python dependencies
2 parents 77ee514 + 96543d9 commit 7859ed4

File tree

16 files changed

+221
-148
lines changed

16 files changed

+221
-148
lines changed

README.md

Lines changed: 46 additions & 68 deletions
Large diffs are not rendered by default.

examples/ReadMe.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,34 @@
1919

2020
--------
2121

22-
Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py): (Default option: ``--chrome``)
22+
Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py): (Default option: ``--chrome``)
2323

2424
```bash
25-
pytest test_demo_site.py
25+
pytest my_first_test.py
2626
```
2727

28-
<img src="https://seleniumbase.github.io/cdn/gif/demo_page_4.gif" title="SeleniumBase Demo Page" /><br />
28+
<img src="https://seleniumbase.github.io/cdn/gif/fast_swag.gif" title="SeleniumBase Demo Page" /><br />
2929

3030
--------
3131

32-
Run an example test in Firefox:
32+
Here's one way of changing the browser to Firefox:
3333

3434
```bash
35-
pytest my_first_test.py --browser=firefox
35+
pytest my_first_test.py --firefox
3636
```
3737

3838
--------
3939

40+
Another [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py) for a web page that has lots of different HTML items:
41+
42+
```bash
43+
pytest test_demo_site.py
44+
```
45+
46+
<img src="https://seleniumbase.github.io/cdn/gif/demo_page_4.gif" title="SeleniumBase Demo Page" /><br />
47+
48+
--------
49+
4050
Run an example test in ``--demo`` mode: (highlight assertions)
4151

4252
```bash

examples/example_logs/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ python -m http.server 1948
4545
🔵 Here's a full example of what the SeleniumBase Dashboard may look like:
4646

4747
```bash
48-
pytest test_suite.py --dashboard --rs --headless
48+
pytest test_suite.py test_image_saving.py --dashboard --rs --headless
4949
```
5050

5151
<img src="https://seleniumbase.github.io/cdn/img/dashboard_2.png" alt="The SeleniumBase Dashboard" title="The SeleniumBase Dashboard" width="480" />

examples/hack_the_planet.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def test_all_your_base_are_belong_to_us(self):
3838
self.set_text_content('#shelf-1 a[href*="mac"]', "ALL")
3939
self.set_text_content('#shelf-1 a[href*="iphone"]', "YOUR")
4040
self.set_text_content('#shelf-1 a[href*="ipad"]', "BASE")
41+
self.remove_element('#shelf-1 [role="listitem"]:nth-child(5)')
4142
self.set_text_content('#shelf-1 a[href*="watch"]', "ARE")
4243
self.set_text_content('#shelf-1 a[href*="airpods"]', "BELONG")
4344
self.set_text_content('#shelf-1 a[href*="airtag"]', "TO")

examples/verify_undetected.py

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,24 @@
66

77

88
class UndetectedTest(BaseCase):
9-
def verify_success(self):
10-
self.assert_text("OH YEAH, you passed!", "h1", timeout=6.25)
11-
self.post_message("Selenium wasn't detected!", duration=2.8)
12-
self._print("\n Success! Website did not detect Selenium! ")
13-
14-
def fail_me(self):
15-
self.fail('Selenium was detected! Try using: "pytest --uc"')
16-
179
def test_browser_is_undetected(self):
18-
if not (self.undetectable):
10+
if not self.undetectable:
1911
self.get_new_driver(undetectable=True)
20-
self.driver.get("https://nowsecure.nl/#relax")
21-
try:
22-
self.verify_success()
23-
except Exception:
24-
self.clear_all_cookies()
12+
self.driver.uc_open_with_reconnect(
13+
"https://nowsecure.nl/#relax", reconnect_time=3
14+
)
15+
self.sleep(1.2)
16+
if not self.is_text_visible("OH YEAH, you passed!", "h1"):
2517
self.get_new_driver(undetectable=True)
26-
self.driver.get("https://nowsecure.nl/#relax")
27-
try:
28-
self.verify_success()
29-
except Exception:
30-
if self.is_element_visible('iframe[src*="challenge"]'):
31-
with self.frame_switch('iframe[src*="challenge"]'):
32-
self.click("span.mark")
33-
else:
34-
self.fail_me()
35-
try:
36-
self.verify_success()
37-
except Exception:
38-
self.fail_me()
18+
self.driver.uc_open_with_reconnect(
19+
"https://nowsecure.nl/#relax", reconnect_time=3
20+
)
21+
self.sleep(1.2)
22+
if not self.is_text_visible("OH YEAH, you passed!", "h1"):
23+
if self.is_element_visible('iframe[src*="challenge"]'):
24+
with self.frame_switch('iframe[src*="challenge"]'):
25+
self.click("span.mark")
26+
self.sleep(2)
27+
self.assert_text("OH YEAH, you passed!", "h1", timeout=3)
28+
self.post_message("Selenium wasn't detected!", duration=2.8)
29+
self._print("\n Success! Website did not detect Selenium! ")

help_docs/demo_mode.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,25 @@
22

33
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Demo Mode 🎦
44

5-
<p align="left"><img src="https://seleniumbase.github.io/cdn/gif/xkcd_vid.gif" width="400" alt="SeleniumBase Example" title="SeleniumBase Example" /></p>
5+
<p align="left"><img src="https://seleniumbase.github.io/cdn/gif/xkcd_vid.gif" width="480" alt="SeleniumBase Example" title="SeleniumBase Example" /></p>
66

77
<p align="left">🔵 <b translate="no">Demo Mode</b> helps you see what a test is doing.</p>
88

99
<p align="left">🏇💨 👀 If a test runs too fast for your eyes, use <b translate="no">Demo Mode</b> to slow it down, highlight actions, and display assertions. Example usage:</p>
1010

11+
```bash
12+
cd examples/
13+
pytest test_coffee_cart.py --demo
14+
```
15+
16+
<p align="left"><a href="https://seleniumbase.io/coffee/" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="480" alt="SeleniumBase Coffee Cart Test" title="SeleniumBase Coffee Cart Test" /></a></p>
17+
18+
> <p>(<code translate="no">--demo</code> mode slows down tests and highlights actions)</p>
19+
20+
--------
21+
22+
Another example:
23+
1124
```bash
1225
pytest my_first_test.py --demo
1326
```

help_docs/features_list.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- SeleniumBase Docs -->
22

3-
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=EablmOazy-k"><img src="http://img.youtube.com/vi/EablmOazy-k/0.jpg" title="SeleniumBase on YouTube" width="285" /></a>
4-
<!-- GitHub Only --><p>(<b><a href="https://www.youtube.com/watch?v=EablmOazy-k">Watch the new tutorial on YouTube</a></b>)</p>
3+
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=EablmOazy-k"><img src="http://img.youtube.com/vi/EablmOazy-k/0.jpg" title="SeleniumBase on YouTube" width="365" /></a>
4+
<!-- GitHub Only --><p>(<b><a href="https://www.youtube.com/watch?v=EablmOazy-k">Watch the SeleniumBase tutorial from Selenium-Conf-2023 on YouTube</a></b>)</p>
55

66
<a id="feature_list"></a>
77

@@ -25,7 +25,7 @@
2525
* Can run tests with proxy+auth via PAC URL. (``--proxy-pac-url=USER:[email protected]``)
2626
* Can run tests with a customized browser user agent. (``--agent=USER_AGENT_STRING``)
2727
* Can set a Chromium User Data Directory/Profile to load. (``--user-data-dir=DIR``)
28-
* Can avoid detection by sites that try to block Selenium. (``--undetected``/``--uc``)
28+
* Can [avoid detection](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md) by sites that try to block Selenium. (``--undetected``/``--uc``)
2929
* Can integrate with [selenium-wire](https://github.com/wkeeling/selenium-wire) for inspecting browser requests. (``--wire``)
3030
* Can load Chrome Extension ZIP files. (``--extension-zip=ZIP``)
3131
* Can load Chrome Extension folders. (``--extension-dir=DIR``)
@@ -50,11 +50,11 @@
5050

5151
--------
5252

53-
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=yEQeAU_mrg0"><img src="http://img.youtube.com/vi/yEQeAU_mrg0/0.jpg" title="SeleniumBase on YouTube" width="285" /></a>
53+
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=yEQeAU_mrg0"><img src="http://img.youtube.com/vi/yEQeAU_mrg0/0.jpg" title="SeleniumBase on YouTube" width="365" /></a>
5454
<!-- GitHub Only --><p>(<b><a href="https://www.youtube.com/watch?v=yEQeAU_mrg0">Have fun with test automation!</a></b>)</p>
5555

56-
(<b><a href="https://www.youtube.com/watch?v=Sjzq9kU5kOw">Watch the old tutorial on YouTube</a></b>)
56+
(<b><a href="https://www.youtube.com/watch?v=Sjzq9kU5kOw">Watch the original tutorial on YouTube</a></b>)
5757

58-
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/sb_logo_10.png" alt="SeleniumBase" title="SeleniumBase" width="200"></a></p>
58+
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/sb_logo_10.png" alt="SeleniumBase" title="SeleniumBase" width="240"></a></p>
5959

60-
[<img src="https://seleniumbase.github.io/cdn/img/super_logo_sb.png" title="SeleniumBase" width="200">](https://seleniumbase.io/)
60+
[<img src="https://seleniumbase.github.io/cdn/img/super_logo_sb.png" title="SeleniumBase" width="240">](https://seleniumbase.io/)

help_docs/webdriver_installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ brew upgrade geckodriver
6666

6767
**Linux shortcuts**:
6868

69-
If you still need the web drivers, here are some scripts to help you get ``chromedriver`` and ``geckodriver`` on a Linux machine:
69+
If you still need drivers, these scripts download ``chromedriver`` and ``geckodriver`` to a Linux machine:
7070

7171
```bash
72-
wget https://chromedriver.storage.googleapis.com/72.0.3626.69/chromedriver_linux64.zip
72+
wget https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip
7373
unzip chromedriver_linux64.zip
7474
mv chromedriver /usr/local/bin/
7575
chmod +x /usr/local/bin/chromedriver
7676
```
7777

7878
```bash
79-
wget https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz
80-
tar xvfz geckodriver-v0.33.0-linux64.tar.gz
79+
wget https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz
80+
tar xvfz geckodriver-v0.34.0-linux64.tar.gz
8181
mv geckodriver /usr/local/bin/
8282
chmod +x /usr/local/bin/geckodriver
8383
```

mkdocs_build/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ pipdeptree>=2.13.2
77
python-dateutil>=2.8.2
88
Markdown==3.5.2
99
markdown2==2.4.12
10-
MarkupSafe==2.1.4
10+
MarkupSafe==2.1.5
1111
Jinja2==3.1.3
1212
click==8.1.7
1313
ghp-import==2.1.0
14-
watchdog==3.0.0
14+
watchdog==4.0.0
1515
cairocffi==1.6.1
1616
pathspec==0.12.1
1717
Babel==2.14.0
@@ -20,7 +20,7 @@ lxml==5.1.0
2020
pyquery==2.0.0
2121
readtime==3.0.0
2222
mkdocs==1.5.3
23-
mkdocs-material==9.5.6
23+
mkdocs-material==9.5.9
2424
mkdocs-exclude-search==0.6.6
2525
mkdocs-simple-hooks==0.1.5
2626
mkdocs-material-extensions==1.3.1

requirements.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
pip>=23.3.2
1+
pip>=24.0
22
packaging>=23.2
33
setuptools>=68.0.0;python_version<"3.8"
4-
setuptools>=69.0.3;python_version>="3.8"
4+
setuptools>=69.1.0;python_version>="3.8"
55
wheel>=0.42.0
66
attrs>=23.2.0
7-
certifi>=2023.11.17
7+
certifi>=2024.2.2
88
filelock>=3.12.2;python_version<"3.8"
99
filelock>=3.13.1;python_version>="3.8"
1010
platformdirs>=4.0.0;python_version<"3.8"
11-
platformdirs>=4.1.0;python_version>="3.8"
11+
platformdirs>=4.2.0;python_version>="3.8"
1212
typing-extensions>=4.9.0;python_version>="3.8"
1313
parse>=1.20.1
1414
parse-type>=0.6.2
@@ -18,7 +18,7 @@ idna==3.6
1818
chardet==5.2.0
1919
charset-normalizer==3.3.2
2020
urllib3>=1.26.18,<2;python_version<"3.10"
21-
urllib3>=1.26.18,<2.2.0;python_version>="3.10"
21+
urllib3>=1.26.18,<2.3.0;python_version>="3.10"
2222
requests==2.31.0
2323
pynose==1.4.8
2424
sniffio==1.3.0
@@ -41,7 +41,8 @@ py==1.11.0
4141
pytest==7.4.4;python_version<"3.8"
4242
pytest==8.0.0;python_version>="3.8"
4343
pytest-html==2.0.1
44-
pytest-metadata==3.0.0
44+
pytest-metadata==3.0.0;python_version<"3.8"
45+
pytest-metadata==3.1.0;python_version>="3.8"
4546
pytest-ordering==0.6
4647
pytest-rerunfailures==13.0
4748
pytest-xdist==3.5.0

0 commit comments

Comments
 (0)