Skip to content

Commit c4068cb

Browse files
authored
Merge pull request #315 from seleniumbase/update-pytest
Update pytest version to 4.4.1
2 parents 1a04bff + 8edc144 commit c4068cb

File tree

4 files changed

+24
-51
lines changed

4 files changed

+24
-51
lines changed

README.md

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,77 +12,43 @@ pytest my_first_test.py --demo_mode
1212

1313
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Quick Start:
1414

15-
(<i>Requires **[Git and Python/Pip](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/install_python_pip_git.md)** [<img src="https://img.shields.io/badge/python-2.7,_3.x-22AADD.svg" alt="Python versions" />](https://www.python.org/downloads/). Optionally, you may want to use a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md) to isolate Python dependencies between projects.</i>)
15+
(<i>Requires **[Python/Pip](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/install_python_pip_git.md)** [<img src="https://img.shields.io/badge/python-2.7,_3.x-22AADD.svg" alt="Python versions" />](https://www.python.org/downloads/). Optionally, you may want to use a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md) to isolate Python dependencies between projects.</i>)
1616

17-
**Make sure you're using the latest versions of Pip and Setuptools:**
18-
```
19-
python -m pip install -U pip setuptools
20-
```
21-
* (Depending on your user permissions, you may need to add ``--user`` to the command if you're not inside a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md), or use "[sudo](https://en.wikipedia.org/wiki/Sudo)" on a UNIX-based OS if you're getting errors during installation.)
22-
23-
#### Clone SeleniumBase from GitHub:
17+
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Git clone and install SeleniumBase:
2418
```
2519
git clone https://github.com/seleniumbase/SeleniumBase.git
26-
```
27-
(<i>A Git GUI tool like [SourceTree](https://www.sourcetreeapp.com/) or [GitHub Desktop](https://desktop.github.com/) may help.</i>)
28-
29-
#### Install SeleniumBase:
30-
If installing SeleniumBase from a local clone, use:
31-
```
3220
cd SeleniumBase
33-
pip install -r requirements.txt -U
34-
python setup.py install
21+
pip install .
3522
```
36-
* (Use ``python setup.py develop`` if inside a virtual environment.)
3723

38-
If installing SeleniumBase from [PyPI](https://pypi.python.org/pypi/seleniumbase) [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase), use:
24+
You can also install SeleniumBase from [PyPI](https://pypi.python.org/pypi/seleniumbase): [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)
3925
```
40-
pip install seleniumbase -U --no-cache-dir
26+
pip install seleniumbase
4127
```
28+
* (Add ``--upgrade`` to get the latest packages and ``--no-cache-dir`` to force a reinstall.)
4229

43-
If installing SeleniumBase from GitHub, use:
30+
You can also install a specific GitHub branch of SeleniumBase:
4431
```
4532
pip install -e git+https://github.com/seleniumbase/SeleniumBase.git@master#egg=seleniumbase
4633
```
4734

48-
#### Download a web driver to your System Path or to the [seleniumbase/drivers](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/drivers) folder:
35+
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Download a web driver:
4936

50-
SeleniumBase can download a driver to the seleniumbase/drivers folder with the ``install`` command:
37+
SeleniumBase can download a web driver to the [seleniumbase/drivers](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/drivers) folder with the ``install`` command:
5138
```
5239
seleniumbase install chromedriver
5340
```
5441
* (You need a different web driver for each web browser you want to run automation on: ``chromedriver`` for Chrome, ``edgedriver`` for Edge, ``geckodriver`` for Firefox, ``operadriver`` for Opera, and ``iedriver`` for Internet Explorer.)
5542

56-
#### Run a test on Chrome:
43+
### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Run a test on Chrome:
5744
```
5845
cd examples
5946
pytest my_first_test.py --browser=chrome
6047
```
6148
* (Chrome is the default browser if not specified with ``--browser``)
6249

63-
**Here's what [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) looks like:**
64-
65-
```python
66-
from seleniumbase import BaseCase
67-
68-
class MyTestClass(BaseCase):
69-
70-
def test_basic(self):
71-
self.open("https://xkcd.com/353/")
72-
self.assert_element('img[alt="Python"]')
73-
self.click('a[rel="license"]')
74-
self.assert_text("free to copy", "div center")
75-
self.open("https://xkcd.com/1481/")
76-
title = self.get_attribute("#comic img", "title")
77-
self.assert_true("86,400 seconds per day" in title)
78-
self.click("link=Blag")
79-
self.assert_text("The blag of the webcomic", "h2")
80-
self.update_text("input#s", "Robots!\n")
81-
self.assert_text("Hooray robots!", "#content")
82-
self.open("https://xkcd.com/1319/")
83-
self.assert_exact_text("Automation", "#ctitle")
84-
```
85-
(<i>By default, [CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp) are used for finding page elements.</i>)
50+
**Check out [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) to see what a simple test looks like:**
51+
* (<i>By default, [CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp) are used for finding page elements.</i>)
8652

8753
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Learn More:
8854

help_docs/install_python_pip_git.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
You can [download Git from here](http://git-scm.com/downloads).
66

7-
(You can also download the SeleniumBase repository right from GitHub and skip all the git-related commands.)
7+
(<i>A Git GUI tool like [SourceTree](https://www.sourcetreeapp.com/) or [GitHub Desktop](https://desktop.github.com/) can help you with Git commands.</i>)
8+
9+
(You can also download SeleniumBase from GitHub without using git-related commands.)
810

911
### [Python 2.7 or 3.x](https://www.python.org/downloads/)
1012

@@ -46,5 +48,10 @@ You can also get pip (or fix pip) by using:
4648
```bash
4749
curl https://bootstrap.pypa.io/get-pip.py | python
4850
```
51+
* (If you get SSL errors while trying to install packages with pip, see [this Stackoverflow post](https://stackoverflow.com/questions/49768770/not-able-to-install-python-packages-ssl-tlsv1-alert-protocol-version), which tells you to run the above command.)
4952

50-
(If you get SSL errors while trying to install packages with pip, see [this Stackoverflow post](https://stackoverflow.com/questions/49768770/not-able-to-install-python-packages-ssl-tlsv1-alert-protocol-version), which tells you to run the above command.)
53+
**Keep Pip and Setuptools up-to-date:**
54+
```
55+
python -m pip install -U pip setuptools
56+
```
57+
* (Depending on your user permissions, you may need to add ``--user`` to the command if you're not inside a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md), or use "[sudo](https://en.wikipedia.org/wiki/Sudo)" on a UNIX-based OS if you're getting errors during installation.)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ unittest2
88
selenium==3.141.0
99
requests==2.21.0
1010
urllib3==1.24.1
11-
pytest>=4.4.0
11+
pytest>=4.4.1
1212
pytest-cov>=2.6.1
1313
pytest-forked>=1.0.2
1414
pytest-html>=1.20.0

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
setup(
1919
name='seleniumbase',
20-
version='1.23.0',
20+
version='1.23.1',
2121
description='Reliable Browser Automation & Testing Framework',
2222
long_description=long_description,
2323
long_description_content_type='text/markdown',
@@ -61,7 +61,7 @@
6161
'selenium==3.141.0',
6262
'requests==2.21.0', # Changing this may effect "urllib3"
6363
'urllib3==1.24.1', # Keep this lib in sync with "requests"
64-
'pytest>=4.4.0',
64+
'pytest>=4.4.1',
6565
'pytest-cov>=2.6.1',
6666
'pytest-forked>=1.0.2',
6767
'pytest-html>=1.20.0',

0 commit comments

Comments
 (0)