Skip to content

Commit 8cc3715

Browse files
authored
Merge pull request #2500 from seleniumbase/several-updates
Several updates
2 parents e7ca064 + c22fcc2 commit 8cc3715

File tree

24 files changed

+148
-139
lines changed

24 files changed

+148
-139
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
pytest my_first_test.py
6464
```
6565

66-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
66+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
6767

6868
> ``pytest`` uses ``--chrome`` by default unless set differently.
6969
@@ -361,10 +361,10 @@ COMMANDS:
361361
<summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
362362
363363
```bash
364-
*** chromedriver to download = 116.0.5845.96 (Latest Stable)
364+
*** chromedriver to download = 121.0.6167.85 (Latest Stable)
365365
366366
Downloading chromedriver-mac-arm64.zip from:
367-
https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/mac-arm64/chromedriver-mac-arm64.zip ...
367+
https://storage.googleapis.com/chrome-for-testing-public/121.0.6167.85/mac-arm64/chromedriver-mac-arm64.zip ...
368368
Download Complete!
369369
370370
Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ...
@@ -373,8 +373,8 @@ Unzip Complete!
373373
The file [chromedriver] was saved to:
374374
/Users/michael/github/SeleniumBase/seleniumbase/drivers/chromedriver
375375
376-
Making [chromedriver 116.0.5845.96] executable ...
377-
[chromedriver 116.0.5845.96] is now ready for use!
376+
Making [chromedriver 121.0.6167.85] executable ...
377+
[chromedriver 121.0.6167.85] is now ready for use!
378378
```
379379
380380
</details>
@@ -392,7 +392,7 @@ cd examples/
392392
pytest my_first_test.py
393393
```
394394
395-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
395+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
396396
397397
<p align="left"><b>Here's the code for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</b></p>
398398

examples/dialog_boxes/dialog_box_tour.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ def test_dialog_boxes(self):
8787

8888
self.open("https://seleniumbase.io/help_docs/ReadMe/")
8989
self.highlight("h1")
90-
self.highlight_click('a:contains("Running Example Tests")')
90+
self.slow_scroll_to('article p a[href*="/examples/ReadMe/"]')
91+
zoom_in = 'article p a[href*="/examples/ReadMe/"]{zoom: 1.8;}'
92+
self.add_css_style(zoom_in)
93+
self.highlight_click('article p a[href*="/examples/ReadMe/"]')
9194
self.highlight("h1")
9295

9396
self.set_jqc_theme("bootstrap", color="green", width="52%")

examples/migration/raw_selenium/ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ With raw Selenium, that requires more code:<br />
7070

7171
<p>💡 SeleniumBase has its own <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">Recorder / Test Generator</a> for creating tests from manual browser actions.</p>
7272

73-
<p>💡 SeleniumBase comes with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">test case management software, ("CasePlans")</a>, for organizing tests and step descriptions.</p>
73+
<p>💡 SeleniumBase comes with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">test case management software, ("Case Plans")</a>, for organizing tests and step descriptions.</p>
7474

75-
<p>💡 SeleniumBase includes tools for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">building data apps, ("ChartMaker")</a>, which can generate JavaScript from Python.</p>
75+
<p>💡 SeleniumBase includes tools for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">building data apps, ("Chart Maker")</a>, which can generate JavaScript from Python.</p>
7676

7777
</div>
7878

help_docs/ReadMe.md

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

3-
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/sb_word_cloud.png" alt="SeleniumBase" title="SeleniumBase" width="450" /></a></p>
3+
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/sb_word_cloud.png" alt="SeleniumBase" title="SeleniumBase" width="330" /></a></p>
44

55
## [<img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Help Docs
66

@@ -33,10 +33,13 @@
3333
<a href="https://seleniumbase.io/examples/dialog_boxes/ReadMe/">🛂 Dialog Boxes</a>
3434
<br />
3535
<a href="https://seleniumbase.io/help_docs/recorder_mode/">🔴 Recorder</a> |
36-
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/migration/raw_selenium">🚝 Migrate</a>
36+
<a href="https://seleniumbase.io/devices/?url=seleniumbase.io">💻 Device Farm</a>
3737
<br />
3838
<a href="https://seleniumbase.io/examples/presenter/ReadMe/">🎞️ Slides</a> |
39-
<a href="https://seleniumbase.io/examples/chart_maker/ReadMe/">📶 Charts</a>
39+
<a href="https://seleniumbase.io/examples/chart_maker/ReadMe/">📶 Chart Maker</a>
40+
<br / >
41+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md">🎖️ GUI</a> |
42+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">👤 UC Mode</a>
4043
</p>
4144

4245
--------
@@ -57,19 +60,20 @@
5760
<div><a href="https://seleniumbase.io/examples/example_logs/ReadMe/"><b>The Dashboard</b></a></div>
5861
<div><a href="https://seleniumbase.io/help_docs/recorder_mode/"><b>Recorder Mode</b></a></div>
5962
<div><a href="https://seleniumbase.io/help_docs/commander/"><b>pytest Commander</b></a></div>
63+
<div><a href="https://seleniumbase.io/help_docs/method_summary/"><b>Method Summary</b></a></div>
6064
<div><a href="https://seleniumbase.io/help_docs/syntax_formats/"><b>Syntax Formats</b></a></div>
6165
<div><a href="https://seleniumbase.io/examples/behave_bdd/ReadMe/"><b>Behave BDD</b></a></div>
6266
<div><a href="https://seleniumbase.io/help_docs/behave_gui/"><b>Behave Commander</b></a></div>
6367
<div><a href="https://seleniumbase.io/help_docs/mobile_testing/"><b>Mobile Device Testing</b></a></div>
64-
<div><a href="https://seleniumbase.io/help_docs/method_summary/"><b>Method Summary (API Ref)</b></a></div>
6568
<div><a href="https://seleniumbase.io/help_docs/case_plans/"><b>Case Plans</b></a></div>
69+
<div><a href="https://seleniumbase.io/examples/chart_maker/ReadMe/"><b>Chart Maker</b></a></div>
6670
<div><a href="https://seleniumbase.io/help_docs/translations/"><b>Language Translations</b></a></div>
6771
<div><a href="https://seleniumbase.io/help_docs/locale_codes/"><b>Language Locale Codes</b></a></div>
6872
<div><a href="https://seleniumbase.io/help_docs/js_package_manager/"><b>JS Package Manager</b></a></div>
69-
<div><a href="https://seleniumbase.io/examples/tour_examples/ReadMe/"><b>Tour Examples</b></a></div>
73+
<div><a href="https://seleniumbase.io/examples/tour_examples/ReadMe/"><b>Tour Maker</b></a></div>
7074
<div><a href="https://seleniumbase.io/examples/presenter/ReadMe/"><b>Presentation Maker</b></a></div>
71-
<div><a href="https://seleniumbase.io/examples/chart_maker/ReadMe/"><b>Chart Maker</b></a></div>
7275
<div><a href="https://seleniumbase.io/help_docs/handling_iframes/"><b>Handling iframes</b></a></div>
76+
<div><a href="https://seleniumbase.io/help_docs/uc_mode/"><b>Undetected Mode (UC Mode)</b></a></div>
7377
<div><a href="https://seleniumbase.io/help_docs/mysql_installation/"><b>MySQL Installation Overview</b></a></div>
7478
<div><a href="https://seleniumbase.io/seleniumbase/utilities/selenium_grid/ReadMe/"><b>Using the Selenium Grid</b></a></div>
7579
<div><a href="https://seleniumbase.io/help_docs/desired_capabilities/"><b>Browser Desired Capabilities</b></a></div>

mkdocs_build/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
regex>=2023.12.25
55
pymdown-extensions>=10.7
6-
pipdeptree>=2.13.2
6+
pipdeptree>=2.14.0
77
python-dateutil>=2.8.2
88
Markdown==3.5.2
99
markdown2==2.4.12

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pytest==7.4.4;python_version<"3.8"
4242
pytest==8.0.0;python_version>="3.8"
4343
pytest-html==2.0.1
4444
pytest-metadata==3.0.0;python_version<"3.8"
45-
pytest-metadata==3.1.0;python_version>="3.8"
45+
pytest-metadata==3.1.1;python_version>="3.8"
4646
pytest-ordering==0.6
4747
pytest-rerunfailures==13.0
4848
pytest-xdist==3.5.0

seleniumbase/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img src="https://seleniumbase.github.io/cdn/img/sb_word_cloud.png" alt="SeleniumBase" title="SeleniumBase" width="400" />
1+
<img src="https://seleniumbase.github.io/cdn/img/sb_word_cloud.png" alt="SeleniumBase" title="SeleniumBase" width="330" />
22

33
<h2><img src="https://seleniumbase.github.io/img/logo3b.png" title="SeleniumBase" width="32" /> Framework Folders</h2>
44

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.23.3"
2+
__version__ = "4.23.4"

seleniumbase/behave/behave_sb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def get_configured_sb(context):
367367
# Handle: -D variables="{'KEY':'VALUE','KEY2':'VALUE2'}"
368368
if low_key == "variables":
369369
variables = userdata[key]
370-
if variables and type(variables) is str and len(variables) > 0:
370+
if variables and isinstance(variables, str) and len(variables) > 0:
371371
bad_input = False
372372
if (
373373
not variables.startswith("{")
@@ -377,7 +377,7 @@ def get_configured_sb(context):
377377
else:
378378
try:
379379
variables = ast.literal_eval(variables)
380-
if not type(variables) is dict:
380+
if not isinstance(variables, dict):
381381
bad_input = True
382382
except Exception:
383383
bad_input = True

seleniumbase/console_scripts/sb_install.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,12 @@ def main(override=None, intel_for_uc=None, force_uc=None):
498498
"https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/"
499499
"%s/%s/%s" % (use_version, platform_code, file_name)
500500
)
501+
major_ch_ver = use_version.split(".")[0]
502+
if major_ch_ver.isnumeric() and int(major_ch_ver) >= 121:
503+
download_url = (
504+
"https://storage.googleapis.com/chrome-for-testing-public/"
505+
"%s/%s/%s" % (use_version, platform_code, file_name)
506+
)
501507
url_request = None
502508
if not found_chromedriver:
503509
url_req = requests_get(last)

seleniumbase/console_scripts/sb_print.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def main():
213213
first_paren = line.find("(")
214214
line1 = line[:first_paren + 1]
215215
line2 = new_ws + line[first_paren + 1:]
216-
if not ("):") in line2:
216+
if ("):") not in line2:
217217
new_sb_lines.append(line1)
218218
if get_width(line2) + w > console_width:
219219
if line2.count('", "') == 1:
@@ -353,7 +353,7 @@ def main():
353353
new_ws = line[0:whitespace] + " "
354354
line1 = line.split('("')[0] + "("
355355
line2 = new_ws + '"' + line.split('("')[1]
356-
if not ("):") in line2:
356+
if ("):") not in line2:
357357
new_sb_lines.append(line1)
358358
if get_width(line2) + w > console_width:
359359
if line2.count('" in self.') == 1:
@@ -382,7 +382,7 @@ def main():
382382
new_ws = line[0:whitespace] + " "
383383
line1 = line.split("('")[0] + "("
384384
line2 = new_ws + "'" + line.split("('")[1]
385-
if not ("):") in line2:
385+
if ("):") not in line2:
386386
new_sb_lines.append(line1)
387387
if get_width(line2) + w > console_width:
388388
if line2.count("' in self.") == 1:
@@ -444,7 +444,7 @@ def main():
444444
continue
445445
new_sb_lines.append(line2)
446446
continue
447-
if line.count("(self.") == 1 and not ("):") in line:
447+
if line.count("(self.") == 1 and ("):") not in line:
448448
whitespace = line_length2 - len(line.lstrip())
449449
new_ws = line[0:whitespace] + " "
450450
line1 = line.split("(self.")[0] + "("
@@ -500,7 +500,7 @@ def main():
500500
else:
501501
new_sb_lines.append(line2)
502502
continue
503-
if line.count(" % ") == 1 and not ("):") in line:
503+
if line.count(" % ") == 1 and ("):") not in line:
504504
whitespace = line_length2 - len(line.lstrip())
505505
new_ws = line[0:whitespace] + " "
506506
line1 = line.split(" % ")[0] + " \\"
@@ -509,7 +509,7 @@ def main():
509509
new_sb_lines.append(line1)
510510
new_sb_lines.append(line2)
511511
continue
512-
if line.count(" = ") == 1 and not (" # ") in line:
512+
if line.count(" = ") == 1 and (" # ") not in line:
513513
whitespace = line_length2 - len(line.lstrip())
514514
new_ws = line[0:whitespace] + " "
515515
line1 = line.split(" = ")[0] + " = ("

seleniumbase/core/browser_launcher.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,9 @@ def uc_special_open_if_cf(
361361
driver.switch_to.window(driver.window_handles[-1])
362362
uc_metrics = {}
363363
if (
364-
type(device_width) is int
365-
and type(device_height) is int
366-
and type(device_pixel_ratio) is int
364+
isinstance(device_width, int)
365+
and isinstance(device_height, int)
366+
and isinstance(device_pixel_ratio, int)
367367
):
368368
uc_metrics["width"] = device_width
369369
uc_metrics["height"] = device_height
@@ -847,9 +847,9 @@ def _set_chrome_options(
847847
emulator_settings = {}
848848
device_metrics = {}
849849
if (
850-
type(device_width) is int
851-
and type(device_height) is int
852-
and type(device_pixel_ratio) is int
850+
isinstance(device_width, int)
851+
and isinstance(device_height, int)
852+
and isinstance(device_pixel_ratio, int)
853853
):
854854
device_metrics["width"] = device_width
855855
device_metrics["height"] = device_height
@@ -1389,7 +1389,7 @@ def get_driver(
13891389
headless = True
13901390
if (
13911391
binary_location
1392-
and type(binary_location) is str
1392+
and isinstance(binary_location, str)
13931393
and (
13941394
browser_name == constants.Browser.GOOGLE_CHROME
13951395
or browser_name == constants.Browser.EDGE
@@ -2553,9 +2553,9 @@ def get_local_driver(
25532553
emulator_settings = {}
25542554
device_metrics = {}
25552555
if (
2556-
type(device_width) is int
2557-
and type(device_height) is int
2558-
and type(device_pixel_ratio) is int
2556+
isinstance(device_width, int)
2557+
and isinstance(device_height, int)
2558+
and isinstance(device_pixel_ratio, int)
25592559
):
25602560
device_metrics["width"] = device_width
25612561
device_metrics["height"] = device_height
@@ -3703,9 +3703,9 @@ def get_local_driver(
37033703
if mobile_emulator:
37043704
uc_metrics = {}
37053705
if (
3706-
type(device_width) is int
3707-
and type(device_height) is int
3708-
and type(device_pixel_ratio) is int
3706+
isinstance(device_width, int)
3707+
and isinstance(device_height, int)
3708+
and isinstance(device_pixel_ratio, int)
37093709
):
37103710
uc_metrics["width"] = device_width
37113711
uc_metrics["height"] = device_height

seleniumbase/core/jqc_helper.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ def jquery_confirm_text_dialog(driver, message, button=None, options=None):
118118
if not message:
119119
message = ""
120120
if button:
121-
if not type(button) is list and not type(button) is tuple:
122-
raise Exception('"button" should be a (text, color) tuple!')
123-
if len(button) != 2:
121+
if not isinstance(button, (list, tuple)) or len(button) != 2:
124122
raise Exception('"button" should be a (text, color) tuple!')
125123
else:
126124
button = ("Submit", "blue")

seleniumbase/extensions/recorder.zip

4 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)