Skip to content

Commit e7d60cf

Browse files
committed
Update the docs
1 parent 696637a commit e7d60cf

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

help_docs/ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div><a href="https://seleniumbase.io/help_docs/mobile_testing/"><b>Mobile Device Testing</b></a></div>
1818
<div><a href="https://seleniumbase.io/help_docs/method_summary/"><b>Method Summary (API Ref)</b></a></div>
1919
<div><a href="https://seleniumbase.io/help_docs/translations/"><b>Language Translations</b></a></div>
20-
<div><a href="https://seleniumbase.io/help_docs/js_package_mgr/"><b>JS Package Manager</b></a></div>
20+
<div><a href="https://seleniumbase.io/help_docs/js_package_manager/"><b>JS Package Manager</b></a></div>
2121
<div><a href="https://seleniumbase.io/examples/tour_examples/ReadMe/"><b>Tour Examples</b></a></div>
2222
<div><a href="https://seleniumbase.io/help_docs/mysql_installation/"><b>MySQL Installation Overview</b></a></div>
2323
<div><a href="https://seleniumbase.io/seleniumbase/utilities/selenium_grid/ReadMe/"><b>Using the Selenium Grid</b></a></div>
@@ -43,7 +43,7 @@
4343
<div><a href="https://seleniumbase.com/help_docs/mobile_testing.html"><b>Mobile Device Testing</b></a></div>
4444
<div><a href="https://seleniumbase.com/help_docs/method_summary.html"><b>Method Summary (API Ref)</b></a></div>
4545
<div><a href="https://seleniumbase.com/help_docs/translations.html"><b>Language Translations</b></a></div>
46-
<div><a href="https://seleniumbase.com/help_docs/js_package_mgr.html"><b>JS Package Manager</b></a></div>
46+
<div><a href="https://seleniumbase.com/help_docs/js_package_manager.html"><b>JS Package Manager</b></a></div>
4747
<div><a href="https://seleniumbase.com/examples/tour_examples/"><b>Tour Examples</b></a></div>
4848
<div><a href="https://seleniumbase.com/help_docs/mysql_installation.html"><b>MySQL Installation Overview</b></a></div>
4949
<div><a href="https://seleniumbase.com/seleniumbase/utilities/selenium_grid/"><b>Using the Selenium Grid</b></a></div>

help_docs/js_package_mgr.md renamed to help_docs/js_package_manager.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
1-
<p><h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_sb23.png" alt="SeleniumBase" width="220" /></a></h3></p>
2-
31
## <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" width="30" /> JS Package Manager
42

5-
<div>The SeleniumBase JS Package Manager lets you load any JavaScript library into any website.</div>
6-
<p><div>Here's an example of loading a website-tour library into a browser while visiting Google:</div></p>
3+
<div>SeleniumBase's JS Package Manager lets you load JavaScript libraries into any website from a CDN link.</div>
4+
<p><div>Here's an example of loading a website-tour library into a web browser while visiting Google:</div></p>
75

8-
<img src="https://cdn2.hubspot.net/hubfs/100006/google_tour_3.gif" title="SeleniumBase Tour of Google"><br />
6+
<img src="https://cdn2.hubspot.net/hubfs/100006/google_tour_3.gif" title="SeleniumBase Tour of Google" /><br />
97

10-
This example from [google_tour.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/google_tour.py) can be run with <b>pytest</b> from the SeleniumBase ``examples/tour_examples`` folder with the following command after you've cloned and installed [SeleniumBase from GitHub](https://github.com/seleniumbase/SeleniumBase):
8+
This example, ([google_tour.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/google_tour.py) from the SeleniumBase ``examples/tour_examples/`` folder), can be run with ``pytest`` after you've cloned and installed [SeleniumBase from GitHub](https://github.com/seleniumbase/SeleniumBase):
119

1210
```bash
1311
pytest google_tour.py
1412
```
1513

16-
<div>Website tours are just one way of demonstrating the abilities of the SeleniumBase JS Package Manager.</div>
17-
<div>Here's the code used for loading JS packages into the web browser with SeleniumBase:</div>
14+
<div>Since a CDN is used for holding packages, you no longer need to use other package managers such as NPM, Bower, or Yarn.</div>
15+
<p><div>Here's the Python code for loading JS packages into the web browser with SeleniumBase:</div></p>
1816

1917
```python
2018
self.add_js_link(js_link)
2119
```
2220

23-
This example loads the <a href="https://introjs.com/">IntroJS</a> JavaScript library:
21+
<div>This example loads the <a href="https://introjs.com/">IntroJS</a> JavaScript library:</div>
2422

2523
```python
2624
self.add_js_link("https://cdnjs.cloudflare.com/ajax/libs/intro.js/2.9.3/intro.min.js")
2725
```
2826

2927
<div>You can load any JS package this way as long as you know the URL.</div>
3028

31-
If you're wondering how SeleniumBase does this, here's the Python code, which uses WebDriver's ``execute_script()`` method to make JavaScript calls after escaping quotes:
29+
If you're wondering how SeleniumBase does this, here's the full Python code, which uses WebDriver's ``execute_script()`` method for making JS calls after escaping quotes:
3230

3331
```python
3432
def add_js_link(driver, js_link):
@@ -48,7 +46,7 @@ def add_js_link(driver, js_link):
4846
driver.execute_script(script_to_add_js % js_link)
4947
```
5048

51-
<p>Now that you've loaded the JavaScript into the browser, you may also want to load some CSS to go along with it:</p>
49+
<p>Now that you've loaded JavaScript into the browser, you may also want to load some CSS to go along with it:</p>
5250

5351
```python
5452
self.add_css_link(css_link)
@@ -79,6 +77,13 @@ def add_css_link(driver, css_link):
7977
driver.execute_script(script_to_add_css % css_link)
8078
```
8179

80+
<div>Website tours are just one of the many ways of using the SeleniumBase JS Package Manager.</div>
81+
<p><div>The following example shows the <a href="https://github.com/craftpip/jquery-confirm">JqueryConfirm</a> package loaded into a website for creating fancy dialog boxes:</div></p>
82+
83+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/masterqa6.gif" alt="MasterQA by SeleniumBase" title="MasterQA by SeleniumBase" /><br />
84+
85+
Since the libraries are loaded directly from a CDN, such as [CloudFlare's cdnjs](https://cdnjs.com/), there's no need to use NPM, Bower, Yarn, or other package managers to get the packages that you need into the websites that you want.
86+
8287
--------
8388

8489
<div>To learn more about SeleniumBase, check out the Docs Site:</div>

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ nav:
6969
- API Reference: help_docs/method_summary.md
7070
- Mobile Testing: help_docs/mobile_testing.md
7171
- Console Scripts: seleniumbase/console_scripts/ReadMe.md
72-
- JS Package Manager: help_docs/js_package_mgr.md
72+
- JS Package Manager: help_docs/js_package_manager.md
7373
- Site Tours: examples/tour_examples/ReadMe.md
7474
- Visual Testing: examples/visual_testing/ReadMe.md
7575
- Integrations:

0 commit comments

Comments
 (0)