Update the documentation
This commit is contained in:
parent
e80fb37fbf
commit
c2eb2df438
|
@ -36,7 +36,6 @@ cd examples/presenter
|
|||
pytest core_presentation.py
|
||||
```
|
||||
|
||||
|
||||
<h3><img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="24" /> Creating a new presentation:</h3>
|
||||
|
||||
```python
|
||||
|
@ -59,7 +58,6 @@ If creating multiple presentations at the same time, you can pass the ``name`` p
|
|||
Notes are disabled by default. You can enable notes by specifying:
|
||||
``show_notes=True``
|
||||
|
||||
|
||||
<h3><img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="24" /> Adding a slide to a presentation:</h3>
|
||||
|
||||
```python
|
||||
|
|
|
@ -41,7 +41,7 @@ capabilities = {
|
|||
}
|
||||
```
|
||||
|
||||
(Note that the browser is now being specified in the capabilities file, rather than with ``--browser=BROWSER`` when using a **remote** Selenium Grid. If using a **local** Selenium Grid, specify the browser, eg: ``--browser=chrome`` or ``--browser=firefox``.)
|
||||
(Note that the browser is now being specified in the capabilities file, rather than with ``--BROWSER`` when using a **remote** Selenium Grid. If using a **local** Selenium Grid, specify the browser, eg: ``--firefox``.)
|
||||
|
||||
<div><b>You can generate specific desired capabilities using:</b></div>
|
||||
|
||||
|
@ -65,7 +65,7 @@ caps['KEY'] = False
|
|||
|
||||
(Each pair must be on a separate line. You can interchange single and double quotes.)
|
||||
|
||||
You can also swap ``--browser=remote`` with an actual browser, eg ``--browser=chrome``, which will combine the default SeleniumBase desired capabilities with those that were specified in the capabilities file when using ``--cap_file=FILE.py``. Capabilities will override other parameters, so if you set the browser to one thing and the capabilities browser to another, SeleniumBase will use the capabilities browser as the browser.
|
||||
You can also swap ``--browser=remote`` with an actual browser, eg ``--browser=chrome``, which will combine the default SeleniumBase desired capabilities with those that were specified in the capabilities file when using ``--cap_file=FILE.py``. Capabilities will override other parameters, so if you set the browser to one thing and the capabilities browser to another, SeleniumBase will use the capabilities browser.
|
||||
|
||||
You'll need default SeleniumBase capabilities for:
|
||||
* Using a proxy server (not the same as a Selenium Grid server)
|
||||
|
@ -74,8 +74,7 @@ You'll need default SeleniumBase capabilities for:
|
|||
* Overriding a website's Content Security Policy on Chrome
|
||||
* Other possible reasons
|
||||
|
||||
You can also set browser desired capabilities from a command line string:
|
||||
Example:
|
||||
You can also set browser desired capabilities from a command-line string. Eg:
|
||||
|
||||
```bash
|
||||
pytest test_swag_labs.py --cap-string='{"browserName":"chrome","name":"test1"}' --server="127.0.0.1" --browser=remote
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
* [MIT](https://web.mit.edu/)
|
||||
* [Sony](https://www.sony.com/)
|
||||
* [Tesla](https://www.tesla.com/)
|
||||
* [iboss](https://www.iboss.com/)
|
||||
* [Apple](https://www.apple.com/)
|
||||
* [Akamai](https://www.akamai.com/)
|
||||
|
|
|
@ -87,7 +87,7 @@ Update your [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/mast
|
|||
|
||||
### Have SeleniumBase tests write to your MySQL DB:
|
||||
|
||||
Add the ``--with-db_reporting`` argument on the command line when you want tests to write to your MySQL database. Example:
|
||||
Add the ``--with-db_reporting`` argument on the command-line when you want tests to write to your MySQL database. Example:
|
||||
|
||||
```bash
|
||||
pytest --with-db_reporting
|
||||
|
|
|
@ -118,10 +118,10 @@ The pytest framework comes with a unique system called fixtures, which replaces
|
|||
|
||||
```python
|
||||
def test_sb_fixture_with_no_class(sb):
|
||||
sb.open("https://google.com/ncr")
|
||||
sb.type('[title="Search"]', 'SeleniumBase\n')
|
||||
sb.click('a[href*="github.com/seleniumbase/SeleniumBase"]')
|
||||
sb.click('a[title="seleniumbase"]')
|
||||
sb.open("seleniumbase.io/help_docs/install/")
|
||||
sb.type('input[aria-label="Search"]', "GUI Commander")
|
||||
sb.click('mark:contains("Commander")')
|
||||
sb.assert_title_contains("GUI / Commander")
|
||||
```
|
||||
|
||||
(See the top of <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_sb_fixture.py">examples/test_sb_fixture.py</a> for the test.)
|
||||
|
@ -134,10 +134,10 @@ The <code translate="no">sb</code> pytest fixture can also be used inside of a c
|
|||
```python
|
||||
class Test_SB_Fixture:
|
||||
def test_sb_fixture_inside_class(self, sb):
|
||||
sb.open("https://google.com/ncr")
|
||||
sb.type('[title="Search"]', 'SeleniumBase\n')
|
||||
sb.click('a[href*="github.com/seleniumbase/SeleniumBase"]')
|
||||
sb.click('a[title="examples"]')
|
||||
sb.open("seleniumbase.io/help_docs/install/")
|
||||
sb.type('input[aria-label="Search"]', "GUI Commander")
|
||||
sb.click('mark:contains("Commander")')
|
||||
sb.assert_title_contains("GUI / Commander")
|
||||
```
|
||||
|
||||
(See the bottom of <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_sb_fixture.py">examples/test_sb_fixture.py</a> for the test.)
|
||||
|
|
|
@ -8,4 +8,4 @@ You can find the official Apple documentation regarding "Testing with WebDriver
|
|||
|
||||
Run ``safaridriver --enable`` once in a terminal to enable Safari's WebDriver. (If you’re upgrading from a previous macOS release, you may need to prefix the command with ``sudo``.)
|
||||
|
||||
Now you can use ``--browser=safari`` to run your **SeleniumBase** tests on Safari.
|
||||
Now you can use ``--safari`` to run your **SeleniumBase** tests on Safari.
|
||||
|
|
|
@ -8,7 +8,6 @@ Drivers can be manually downloaded to the ``seleniumbase/drivers`` folder with c
|
|||
|
||||
```bash
|
||||
sbase get chromedriver
|
||||
sbase get chromedriver latest
|
||||
sbase get geckodriver
|
||||
sbase get edgedriver
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue