Update the documentation
This commit is contained in:
parent
5d5685f96c
commit
10887046bc
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> 🐝 Behave test runner for SeleniumBase 🐝</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) 🐝 Behave test runner for SeleniumBase 🐝
|
||||
|
||||
🐝 (Utilizes the [Behave BDD Python library](https://github.com/behave/behave). For more info, see the [Behave tutorial](https://behave.readthedocs.io/en/stable/tutorial.html) and read about [Behave's Gherkin model](https://behave.readthedocs.io/en/stable/gherkin.html).)
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<h3 align="left"><img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" alt="SeleniumBase" width="350" /></h3>
|
||||
|
||||
<h2> 📊 ChartMaker 📶 </h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) 📊 ChartMaker 📶
|
||||
|
||||
<p>SeleniumBase ChartMaker lets you use Python to generate HTML charts.</p>
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<h3 align="left"><img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" alt="SeleniumBase" width="320" /></h3>
|
||||
|
||||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> 🛂 Dialog Boxes 🛂</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) 🛂 Dialog Boxes 🛂
|
||||
|
||||
SeleniumBase Dialog Boxes let your users provide input in the middle of automation scripts.
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
[<img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" title="SeleniumBase" width="220">](https://github.com/seleniumbase/SeleniumBase/)
|
||||
|
||||
<h1> 📑 Presenter 🎞️ </h1>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) 📑 Presenter 🎞️
|
||||
|
||||
<p>SeleniumBase Presenter (slide-maker) lets you use Python to generate HTML presentations.</p>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h3 align="left"><img src="https://seleniumbase.io/cdn/img/g_maps_tour.png" alt="SeleniumBase Tour" width="340" /></h3>
|
||||
|
||||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Interactive Product Tours</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Interactive Product Tours
|
||||
|
||||
<p><b>Increase SaaS Product Adoption by 10x or more.</b></p>
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<a id="language_tests"></a>
|
||||
<h2>🌏 Translated Tests 🈺</h2>
|
||||
|
||||
<b>SeleniumBase</b> supports the following 10 languages: <i>English</i>, <i>Chinese</i>, <i>Dutch</i>, <i>French</i>, <i>Italian</i>, <i>Japanese</i>, <i>Korean</i>, <i>Portuguese</i>, <i>Russian</i>, and <i>Spanish</i>. (Examples can be found in [<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/translations">SeleniumBase/examples/translations</a>])
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) 🌏 Translated Tests 🈺
|
||||
|
||||
<b>SeleniumBase</b> supports the following 10 languages: <i>English</i>, <i>Chinese</i>, <i>Dutch</i>, <i>French</i>, <i>Italian</i>, <i>Japanese</i>, <i>Korean</i>, <i>Portuguese</i>, <i>Russian</i>, and <i>Spanish</i>. (Examples can be found in <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/translations">SeleniumBase/examples/translations</a>)
|
||||
|
||||
Multi-language tests run with **pytest** like other tests. Test methods have a one-to-one mapping to supported languages. Here's an example of a translated test:
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_logo_f6.png" alt="SeleniumBase" width="320" /></a></p>
|
||||
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_logo_f6.png" alt="SeleniumBase" width="330" /></a></p>
|
||||
|
||||
<h2><img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" width="30" /> Automated Visual Regression Testing</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Automated Visual Regression Testing
|
||||
|
||||
Automated Visual Regression Testing can help you detect when the layout of a web page has changed. Instead of comparing pixels from screenshots, layout differences can be detected by comparing HTML tags and attributes with a baseline. If a change is detected, it could mean that something broke, the web page was redesigned, or dynamic content changed.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Help Docs</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Help Docs
|
||||
|
||||
<p align="left">
|
||||
<a href="https://seleniumbase.io/#python_installation">🚁 Start</a> |
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> SeleniumBase Behave GUI / Commander 🐝🎖️</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) SeleniumBase Behave GUI / Commander 🐝🎖️
|
||||
|
||||
🐝🎖️ The <b>SeleniumBase Behave GUI</b> lets you run <code>behave</code> scripts from a Desktop GUI.<br>
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<h3 align="left"><img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" alt="SeleniumBase" width="350" /></h3>
|
||||
|
||||
<h2> 📊 ChartMaker 📶 </h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) 📊 ChartMaker 📶
|
||||
|
||||
<p>SeleniumBase ChartMaker lets you use Python to generate HTML charts.</p>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> SeleniumBase Commander 🎖️</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) SeleniumBase Commander 🎖️
|
||||
|
||||
🎖️ <b>SeleniumBase Commander</b> lets you run <code>pytest</code> scripts from a Desktop GUI.<br>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> pytest options for SeleniumBase</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) pytest options for SeleniumBase
|
||||
|
||||
🎛️ SeleniumBase's [pytest plugin](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/pytest_plugin.py) lets you customize test runs from the CLI (Command-Line Interface), which adds options for setting/enabling the browser type, Dashboard Mode, Demo Mode, Headless Mode, Mobile Mode, Multi-threading Mode, Recorder Mode, reuse-session mode, proxy config, user agent config, browser extensions, html-report mode, and more.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h3><img src="https://seleniumbase.io/img/green_logo.png" title="SeleniumBase" width="32" /> Using Desired Capabilities</h3>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Using Desired Capabilities
|
||||
|
||||
You can specify browser capabilities when running SeleniumBase tests on a remote Selenium Grid server such as <a href="https://www.browserstack.com/automate/capabilities" target="_blank">BrowserStack</a>, <a href="https://www.lambdatest.com/capabilities-generator/" target="_blank">LambdaTest</a>, or <a href="https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/" target="_blank">Sauce Labs</a>.
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<!-- GitHub Only --><p>(<b><a href="https://www.youtube.com/watch?v=Sjzq9kU5kOw">Watch the tutorial on YouTube</a></b>)</p>
|
||||
|
||||
<a id="feature_list"></a>
|
||||
<h2><img src="https://seleniumbase.io/img/green_logo.png" title="SeleniumBase" width="32" /> Features: 🎯</h2>
|
||||
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) SeleniumBase Features: 🎯
|
||||
|
||||
* A powerful Python framework for browser automation and E2E UI testing.
|
||||
* Includes [Recorder Mode](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md) for instantly generating browser tests in Python.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
<h3 align="left"><img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" alt="SeleniumBase" width="300" /></h3>
|
||||
|
||||
<h4> Here are some organizations that have grown their automation with SeleniumBase:</h4>
|
||||
|
||||
* [MIT](https://web.mit.edu/)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Info about hidden files on macOS</h2>
|
||||
## Info about hidden files on macOS
|
||||
|
||||
Depending on your macOS settings, some files may be hidden from view in your Finder window, such as ``.gitignore``. To view all files, run the following command and then reopen the Finder window:
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
[<img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" title="SeleniumBase" width="360">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) How SeleniumBase Works:
|
||||
|
||||
<a id="how_seleniumbase_works"></a>
|
||||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> How it works:</h2>
|
||||
|
||||
At the core, SeleniumBase works by extending [pytest](https://docs.pytest.org/en/latest/) as a direct plugin. SeleniumBase automatically spins up web browsers for tests (using Selenium WebDriver), and then gives those tests access to the SeleniumBase libraries through the [BaseCase class](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py). Tests are also given access to [SeleniumBase command-line arguments](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md) and [SeleniumBase methods](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md), which provide additional functionality.
|
||||
|
||||
|
@ -19,6 +18,26 @@ Then have your test classes inherit BaseCase:
|
|||
class MyTestClass(BaseCase):
|
||||
```
|
||||
|
||||
Here's what a full test might look like:
|
||||
|
||||
```python
|
||||
from seleniumbase import BaseCase
|
||||
|
||||
class TestMFALogin(BaseCase):
|
||||
def test_mfa_login(self):
|
||||
self.open("https://seleniumbase.io/realworld/login")
|
||||
self.type("#username", "demo_user")
|
||||
self.type("#password", "secret_pass")
|
||||
self.enter_mfa_code("#totpcode", "GAXG2MTEOR3DMMDG") # 6-digit
|
||||
self.assert_text("Welcome!", "h1")
|
||||
self.highlight("img#image1") # A fancier assert_element() call
|
||||
self.click('a:contains("This Page")')
|
||||
self.save_screenshot_to_logs() # In "./latest_logs/" folder.
|
||||
self.click_link("Sign out") # Must be "a" tag. Not "button".
|
||||
self.assert_element('a:contains("Sign in")')
|
||||
self.assert_exact_text("You have been signed out!", "#top_message")
|
||||
```
|
||||
|
||||
(See the example test, [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py), for reference.)
|
||||
|
||||
--------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> The HTML Inspector 🔎</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) The HTML Inspector 🔎
|
||||
|
||||
🔎 <b>HTML Inspector</b> provides useful info about a web page.
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
[<img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" title="SeleniumBase" width="220">](https://github.com/seleniumbase/SeleniumBase/)
|
||||
|
||||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Installation</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) SeleniumBase Installation
|
||||
|
||||
<h4>If installing SeleniumBase directly from <a href="https://pypi.python.org/pypi/seleniumbase">PyPI</a>, (the Python Package Index), use:</h4>
|
||||
|
||||
|
@ -54,4 +52,6 @@ pip install git+https://github.com/seleniumbase/SeleniumBase.git@master#egg=sele
|
|||
|
||||
--------
|
||||
|
||||
<a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" alt="SeleniumBase" title="SeleniumBase" width="280" /></a>
|
||||
[<img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" title="SeleniumBase" width="200">](https://github.com/seleniumbase/SeleniumBase/)
|
||||
|
||||
<a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" alt="SeleniumBase" title="SeleniumBase" width="200" /></a>
|
||||
|
|
|
@ -14,7 +14,7 @@ You can download Python from [https://www.python.org/downloads/](https://www.pyt
|
|||
|
||||
### [Pip](https://en.wikipedia.org/wiki/Pip_%28package_manager%29)
|
||||
|
||||
You might already have pip and setuptools installed, but if you don't:
|
||||
You probably already have pip and setuptools installed. If not:
|
||||
|
||||
```bash
|
||||
python -m easy_install -U pip
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> JS Package Manager and Code Generators</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) JS Package Manager and Code Generators
|
||||
|
||||
<h3>🕹️ SeleniumBase lets you load JavaScript packages from any CDN link into any website.</h3>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="25" /> Language Locale Codes</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Language Locale Codes
|
||||
|
||||
You can specify a Language Locale Code to customize web pages on supported websites. With SeleniumBase, you can change the web browser's Locale on the command line by doing this:
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Methods (API Reference)</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) SeleniumBase Methods (API Reference)
|
||||
|
||||
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=_yNJlHnp2JA"><img src="https://seleniumbase.io/cdn/img/sb_api_youtube.png" title="SeleniumBase on YouTube" width="285" /></a>
|
||||
<!-- GitHub Only --><p>(<b><a href="https://www.youtube.com/watch?v=_yNJlHnp2JA">Common API Methods on YouTube</a></b>)</p>
|
||||
|
||||
Here's a list of SeleniumBase method definitions, which are defined in [base_case.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py)
|
||||
Here's a list of SeleniumBase method definitions, which are defined in **[base_case.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py)**
|
||||
|
||||
For backwards compatibility, older versions of method names have remained to keep older scripts working. *(E.g: wait_for_element_visible was shortened to wait_for_element and then to find_element.)*
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_text_f.png" alt="SeleniumBase" title="SeleniumBase" width="290" /></a></p>
|
||||
|
||||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Mobile Testing</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Mobile Testing
|
||||
|
||||
Use ``--mobile`` to run SeleniumBase tests using Chrome's mobile device emulator with default values for Device Metrics and User-Agent.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="25" /> MySQL Installation Instructions</h3>
|
||||
## MySQL Installation Instructions
|
||||
|
||||
|
||||
#### [MySQL](http://www.mysql.com/) (OPTIONAL)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- YouTube View --><a href="https://www.youtube.com/watch?v=eKN5nq7YbdM"><img src="http://img.youtube.com/vi/eKN5nq7YbdM/0.jpg" title="SeleniumBase on YouTube" width="285" /></a>
|
||||
<!-- GitHub Only --><p>(<b><a href="https://www.youtube.com/watch?v=eKN5nq7YbdM">Watch the tutorial on YouTube</a></b>)</p>
|
||||
|
||||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Recorder Mode</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Recorder Mode
|
||||
|
||||
🔴 <b>SeleniumBase Recorder Mode</b> lets you record & export browser actions into test automation scripts.<br>
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Shadow DOM support / Shadow-root interaction</h2>
|
||||
<h3 align="left"><img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" alt="SeleniumBase" width="300" /></h3>
|
||||
|
||||
## Shadow DOM support / Shadow-root interaction
|
||||
|
||||
🔵 SeleniumBase lets you pierce through open Shadow DOM selectors (to interact with elements inside) by adding ``::shadow`` to CSS fragments that include a shadow-root element. For multi-layered shadow-roots, you must individually pierce through each shadow-root element that you want to get through.
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<a id="syntax_formats"></a>
|
||||
<h2><img src="https://seleniumbase.io/img/green_logo.png" title="SeleniumBase" width="32" /> The 20 syntax formats</h2>
|
||||
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) The 20 Syntax Formats
|
||||
|
||||
<b>SeleniumBase</b> supports 20 different syntax formats (<i>design patterns</i>) for structuring tests. (<i>The first 6 are the most common.</i>)
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<a id="language_tests"></a>
|
||||
<h2>🌏 Translated Tests 🈺</h2>
|
||||
|
||||
<b>SeleniumBase</b> supports the following 10 languages: <i>English</i>, <i>Chinese</i>, <i>Dutch</i>, <i>French</i>, <i>Italian</i>, <i>Japanese</i>, <i>Korean</i>, <i>Portuguese</i>, <i>Russian</i>, and <i>Spanish</i>. (Examples can be found in [<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/translations">SeleniumBase/examples/translations</a>])
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) 🌏 Translated Tests 🈺
|
||||
|
||||
<b>SeleniumBase</b> supports the following 10 languages: <i>English</i>, <i>Chinese</i>, <i>Dutch</i>, <i>French</i>, <i>Italian</i>, <i>Japanese</i>, <i>Korean</i>, <i>Portuguese</i>, <i>Russian</i>, and <i>Spanish</i>. (Examples can be found in <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/translations">SeleniumBase/examples/translations</a>)
|
||||
|
||||
Multi-language tests run with **pytest** like other tests. Test methods have a one-to-one mapping to supported languages. Here's an example of a translated test:
|
||||
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Useful grep commands</h2>
|
||||
## Useful grep commands
|
||||
|
||||
There are several useful **grep** commands for helping you find and/or replace text in multiple files. Examples:
|
||||
|
||||
#### List all files containing ``self.get_new_driver(``, ignoring ".pyc" files, from the current directory:
|
||||
|
||||
``grep -rl "self.get_new_driver(" * --exclude=\*.pyc``
|
||||
|
||||
OR
|
||||
|
||||
``grep -rl * -e "self.get_new_driver(" --exclude=\*.pyc``
|
||||
|
||||
To only search ``.py`` files, use ``--include=\*.py``:
|
||||
|
||||
``grep -rl "self.get_new_driver(" * --include=\*.py``
|
||||
|
||||
--------
|
||||
|
||||
#### Replace all occurrences of "foo_abc" with "bar_xyz" on Linux, for Python files from the current directory:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Using Safari's WebDriver for running browser tests on macOS</h2>
|
||||
## Using Safari's WebDriver for running browser tests on macOS
|
||||
|
||||
*(NOTE: Safari's WebDriver requires macOS 10.13 "High Sierra" or later.)*
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
## Verifying that web drivers are installed
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Verifying that web drivers are installed
|
||||
|
||||
On newer versions of SeleniumBase, the driver is automatically downloaded to the ``seleniumbase/drivers`` folder, and does not need to be on the System Path when running tests.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Virtual Environment Tutorial</h2>
|
||||
## Virtual Environment Tutorial
|
||||
|
||||
There are multiple ways of creating a **[Python virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment)**. This tutorial covers two of those:
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[<img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" title="SeleniumBase" width="360">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Installing webdrivers
|
||||
|
||||
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Installing webdrivers</h2>
|
||||
To run web automation, you'll need webdrivers for each browser you plan on using. With SeleniumBase, drivers are downloaded automatically as needed into the SeleniumBase ``drivers`` folder.
|
||||
|
||||
To run web automation, you'll need webdrivers for each browser you plan on using. Here are some commands that'll automatically download the driver you need into the SeleniumBase ``drivers`` folder once you've installed SeleniumBase:
|
||||
You can also download drivers manually with these commands:
|
||||
|
||||
```bash
|
||||
sbase install chromedriver
|
||||
|
@ -88,3 +88,5 @@ chmod +x /usr/local/bin/geckodriver
|
|||
```
|
||||
|
||||
* If you wish to verify that web drivers are working, **[follow these instructions](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/verify_webdriver.md)**.
|
||||
|
||||
[<img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" title="SeleniumBase" width="280">](https://github.com/seleniumbase/SeleniumBase)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h2>🔮 Console Scripts 🔮</h2>
|
||||
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) 🔮 Console Scripts 🔮
|
||||
|
||||
⭐ SeleniumBase console scripts help you get things done, such as getting web drivers, creating a test directory with useful files, activating the SeleniumBase Recorder, launching the SeleniumBase Commander, translating tests into other languages, running a Selenium Grid, and more.
|
||||
|
||||
|
|
Loading…
Reference in New Issue