|
5 | 5 | <meta property="og:image" content="https://seleniumbase.io/cdn/img/mac_sb_logo_5.png" />
|
6 | 6 | <link rel="icon" href="https://seleniumbase.io/img/logo6.png" />
|
7 | 7 |
|
8 |
| -<h2 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_banner_d.png" alt="SeleniumBase" title="SeleniumBase" width="530" /></a></h2> |
9 |
| -<h4 align="center">Everything you need for web testing.</h4> |
10 |
| -<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/releases"> |
11 |
| -<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=2277EE" alt="Latest Release on GitHub" /></a> <a href="https://pypi.org/project/seleniumbase/"> |
12 |
| -<img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=00a0e0" alt="Latest Release on PyPI" /></a> <a href="https://pepy.tech/project/seleniumbase"> |
13 |
| -<img src="https://pepy.tech/badge/seleniumbase/month" alt="SeleniumBase downloads per month" /></a></p> |
14 |
| - |
| 8 | +<h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_logo_d.png" alt="SeleniumBase" title="SeleniumBase" width="220" /></a></h3> |
15 | 9 | <!-- View on GitHub -->
|
16 |
| -<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/actions"> |
17 |
| -<img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://dev.azure.com/seleniumbase/seleniumbase/_build/latest?definitionId=1&branchName=master"> <img src="https://dev.azure.com/seleniumbase/seleniumbase/_apis/build/status/seleniumbase.SeleniumBase?branchName=master" alt="SeleniumBase Azure Pipelines" /></a> <a href="https://gitter.im/seleniumbase/SeleniumBase"> |
18 |
| -<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="SeleniumBase" /></a> <a href="https://seleniumbase.io"> |
19 |
| -<img src="https://img.shields.io/badge/docs-%20📓%20📖%20📚-11BBCC.svg" alt="SeleniumBase.io Docs" title="SeleniumBase.io Docs" /></a></p> |
20 |
| - |
21 |
| -<p align="center">SeleniumBase is a complete framework for browser automation and testing with <a href="https://docs.pytest.org/en/latest/index.html">pytest</a>.<br />The API simplifies <a href="https://www.selenium.dev/documentation/">Selenium</a>'s out-of-the-box API, leading to cleaner, maintainable code. <br />Includes advanced features such as a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">Dashboard</a>, a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">Recorder</a>, and <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/js_package_manager.md">JS code generators</a>.</p> |
| 10 | +<h4 align="center">Better web testing with <a href="https://www.selenium.dev/documentation/">Selenium</a> and <a href="https://docs.pytest.org/en/latest/index.html">pytest</a>.</h4> |
| 11 | +<p align="center"> |
| 12 | +<a href="https://github.com/seleniumbase/SeleniumBase/releases"> |
| 13 | +<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=2277EE" alt="Latest Release on GitHub" /></a> <a href="https://pypi.python.org/pypi/seleniumbase"> |
| 14 | +<img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=22AAEE" alt="Latest Release on PyPI" /></a> <a href="https://seleniumbase.io"> |
| 15 | +<img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBDD.svg" alt="SeleniumBase.io Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions"> |
| 16 | +<img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://gitter.im/seleniumbase/SeleniumBase"> |
| 17 | +<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="SeleniumBase" /></a> |
| 18 | +</p> |
22 | 19 |
|
23 | 20 | <p align="center">
|
24 | 21 | <a href="#python_installation">🚀 Start</a> |
|
|
46 | 43 | <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/dialog_boxes/ReadMe.md">🛂 Dialog</a>
|
47 | 44 | </p>
|
48 | 45 |
|
49 |
| -<p align="left"> |
50 |
| -✅ Get set up in minutes. Deploy anywhere.<br /> |
51 |
| -✅ Build reliable tests with a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">complete API</a>.<br /> |
52 |
| -✅ Learn from 100s of real-world <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">examples</a>.<br /> |
53 |
| -✅ Includes <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">dashboards and reporting tools</a>.<br /> |
54 |
| -✅ Supports Chromium, Firefox, IE, & Safari.<br /> |
55 |
| -✅ Can run on <a href="https://seleniumbase.io/integrations/github/workflows/ReadMe/">GHA</a>, <a href="https://seleniumbase.io/integrations/google_cloud/ReadMe/">GCP</a>, <a href="https://seleniumbase.io/integrations/azure/jenkins/ReadMe/">Azure</a>, & <a href="https://seleniumbase.io/integrations/docker/ReadMe/">Docker</a>.<br /> |
56 |
| -</p> |
57 |
| - |
58 | 46 | --------
|
59 | 47 |
|
60 | 48 | <a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/super_logo_sb.png" alt="SeleniumBase" title="SeleniumBase" width="202" /></a>
|
61 | 49 |
|
62 |
| -<p align="left"><b>Example:</b> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a> (<code>--demo</code> mode)</p> |
| 50 | +<p align="left"><b>Example test:</b> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py">test_demo_site.py</a></p> |
63 | 51 |
|
64 | 52 | ```bash
|
65 |
| -pytest my_first_test.py --demo |
| 53 | +cd examples/ |
| 54 | +pytest test_demo_site.py |
66 | 55 | ```
|
67 | 56 |
|
68 |
| -<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.io/cdn/gif/my_first_test_2.gif" width="480" alt="SeleniumBase Demo Mode" title="SeleniumBase Demo Mode" /></a></p> |
| 57 | +<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py"><img src="https://seleniumbase.io/cdn/gif/demo_page_4.gif" width="400" alt="SeleniumBase Demo Mode" title="SeleniumBase Test" /></a></p> |
69 | 58 |
|
70 |
| -```python |
71 |
| -from seleniumbase import BaseCase |
72 |
| - |
73 |
| -class MyTestClass(BaseCase): |
74 |
| - def test_basics(self): |
75 |
| - url = "https://store.xkcd.com/collections/posters" |
76 |
| - self.open(url) |
77 |
| - self.type('input[name="q"]', "xkcd book") |
78 |
| - self.click('input[value="Search"]') |
79 |
| - self.assert_text("xkcd: volume 0", "h3") |
80 |
| - self.open("https://xkcd.com/353/") |
81 |
| - self.assert_title("xkcd: Python") |
82 |
| - self.assert_element('img[alt="Python"]') |
83 |
| - self.click('a[rel="license"]') |
84 |
| - self.assert_text("free to copy and reuse") |
85 |
| - self.go_back() |
86 |
| - self.click_link("About") |
87 |
| - self.assert_exact_text("xkcd.com", "h2") |
88 |
| -``` |
89 |
| - |
90 |
| --------- |
91 | 59 |
|
92 | 60 | <a id="python_installation"></a>
|
93 | 61 | <h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Python Setup:</h2>
|
@@ -161,53 +129,26 @@ COMMANDS:
|
161 | 129 | Use "pytest" for running tests.
|
162 | 130 | ```
|
163 | 131 |
|
164 |
| -<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Download a webdriver:</h3> |
165 |
| -
|
166 |
| -✅ SeleniumBase can download webdrivers to the [seleniumbase/drivers](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/drivers) folder with the ``install`` command: |
167 |
| -
|
168 |
| -```bash |
169 |
| -sbase install chromedriver |
170 |
| -``` |
171 |
| -
|
172 |
| -* You need a different webdriver for each browser to automate: ``chromedriver`` for Chrome, ``edgedriver`` for Edge, ``geckodriver`` for Firefox, and ``operadriver`` for Opera. |
173 |
| -* If you have the latest version of Chrome installed, get the latest chromedriver (<i>otherwise it defaults to chromedriver 2.44 for compatibility reasons</i>): |
174 |
| -
|
175 |
| -```bash |
176 |
| -sbase install chromedriver latest |
177 |
| -``` |
| 132 | +<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Downloading web drivers:</h3> |
178 | 133 |
|
179 |
| -* If you run a test without the correct webdriver installed, the driver will be downloaded automatically. |
| 134 | +✅ SeleniumBase automatically downloads web drivers as needed, such as ``chromedriver`` and ``geckodriver`` (Firefox). |
180 | 135 |
|
181 |
| -(See [seleniumbase.io/seleniumbase/console_scripts/ReadMe/](https://seleniumbase.io/seleniumbase/console_scripts/ReadMe/) for more information on SeleniumBase console scripts.) |
| 136 | +✅ To manually download a webdriver, see [Console Scripts](https://seleniumbase.io/seleniumbase/console_scripts/ReadMe/) OR [Webdriver Installation](https://seleniumbase.io/help_docs/webdriver_installation/). |
182 | 137 |
|
183 | 138 | <h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Running tests:</h3>
|
184 | 139 |
|
185 |
| -🔵 <b>If you've cloned SeleniumBase from GitHub, you can run sample tests from the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder:</b> |
186 |
| -
|
187 |
| -```bash |
188 |
| -cd examples/ |
189 |
| -pytest test_demo_site.py |
190 |
| -``` |
| 140 | +🔵 If you've cloned SeleniumBase, you can run tests from the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder. |
191 | 141 |
|
192 |
| -> (Chrome is the default browser if not specified with ``--browser=BROWSER``. On Linux, ``--headless`` is the default behavior. You can also run in headless mode on any OS. If your Linux machine has a GUI and you want to see the web browser as tests run, add ``--headed`` or ``--gui``.) |
193 |
| -
|
194 |
| -<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py"><img src="https://seleniumbase.io/cdn/gif/demo_page_2.gif" title="SeleniumBase Demo Page" width="450" /></a><br /> |
195 |
| -
|
196 |
| -🔵 <b>Here are more examples that you can run:</b> |
197 |
| -
|
198 |
| -```bash |
199 |
| -pytest my_first_test.py |
200 |
| -
|
201 |
| -pytest test_swag_labs.py |
202 |
| -``` |
203 |
| -
|
204 |
| -🔵 <b>Run [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) in Demo Mode:</b> |
| 142 | +<p align="left">Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a> in <code>--demo</code> mode:</p> |
205 | 143 |
|
206 | 144 | ```bash
|
| 145 | +cd examples/ |
207 | 146 | pytest my_first_test.py --demo
|
208 | 147 | ```
|
209 | 148 |
|
210 |
| -<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.io/cdn/gif/my_first_test_2.gif" alt="SeleniumBase Demo Mode" title="SeleniumBase Demo Mode" /></a> |
| 149 | +> (Chrome is the default browser if not specified with ``--browser``. On Linux, ``--headless`` is the default behavior.) |
| 150 | +
|
| 151 | +<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.io/cdn/gif/my_first_test_2.gif" alt="SeleniumBase Test" title="SeleniumBase Demo Mode" width="400" /></a> |
211 | 152 |
|
212 | 153 | * By default, **[CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)** are used for finding page elements.
|
213 | 154 | * If you're new to CSS Selectors, games like [CSS Diner](http://flukeout.github.io/) can help you learn.
|
@@ -525,7 +466,7 @@ pytest test_fail.py
|
525 | 466 | pytest --dashboard --rs --headless
|
526 | 467 | ```
|
527 | 468 |
|
528 |
| -<img src="https://seleniumbase.io/cdn/img/dashboard_1.png" alt="The SeleniumBase Dashboard" title="The SeleniumBase Dashboard" width="360" /> |
| 469 | +<img src="https://seleniumbase.io/cdn/img/dashboard_1.png" alt="The SeleniumBase Dashboard" title="The SeleniumBase Dashboard" width="380" /> |
529 | 470 |
|
530 | 471 | 🔵 Additionally, you can host your own SeleniumBase Dashboard Server on a port of your choice. Here's an example of that using Python 3's ``http.server``:
|
531 | 472 |
|
@@ -986,8 +927,8 @@ pytest --reruns=1 --reruns-delay=1
|
986 | 927 | <div><a href="https://pepy.tech/project/seleniumbase"> <img src="https://pepy.tech/badge/seleniumbase" alt="SeleniumBase PyPI downloads" /></a> <a href="https://twitter.com/SeleniumBase">
|
987 | 928 | <img src="https://img.shields.io/twitter/follow/seleniumbase.svg?style=flat-rounded&logo=twitter&label=followers" alt="SeleniumBase Twitter followers" /></a></div>
|
988 | 929 |
|
989 |
| -<p><div><span><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_github.svg" title="SeleniumBase on GitHub" alt="SeleniumBase on GitHub" width="56" /></a></span> |
990 |
| -<span><a href="https://gitter.im/seleniumbase/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_gitter.svg" title="SeleniumBase on Gitter" alt="SeleniumBase on Gitter" width="44" /></a></span> |
991 |
| -<span><a href="https://twitter.com/seleniumbase"><img src="https://seleniumbase.io/img/social/share_twitter.svg" title="SeleniumBase on Twitter" alt="SeleniumBase on Twitter" width="60" /></a></span> |
992 |
| -<span><a href="https://instagram.com/seleniumbase"><img src="https://seleniumbase.io/img/social/share_instagram.svg" title="SeleniumBase on Instagram" alt="SeleniumBase on Instagram" width="52" /></a></span> |
993 |
| -<span><a href="https://www.facebook.com/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_facebook.svg" title="SeleniumBase on Facebook" alt="SeleniumBase on Facebook" width="56" /></a></span></div></p> |
| 930 | +<p><div><span><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_github.svg" title="SeleniumBase on GitHub" alt="SeleniumBase on GitHub" width="46" /></a></span> |
| 931 | +<span><a href="https://gitter.im/seleniumbase/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_gitter.svg" title="SeleniumBase on Gitter" alt="SeleniumBase on Gitter" width="36" /></a></span> |
| 932 | +<span><a href="https://twitter.com/seleniumbase"><img src="https://seleniumbase.io/img/social/share_twitter.svg" title="SeleniumBase on Twitter" alt="SeleniumBase on Twitter" width="48" /></a></span> |
| 933 | +<span><a href="https://instagram.com/seleniumbase"><img src="https://seleniumbase.io/img/social/share_instagram.svg" title="SeleniumBase on Instagram" alt="SeleniumBase on Instagram" width="42" /></a></span> |
| 934 | +<span><a href="https://www.facebook.com/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_facebook.svg" title="SeleniumBase on Facebook" alt="SeleniumBase on Facebook" width="46" /></a></span></div></p> |
0 commit comments