Skip to content

Commit e88c532

Browse files
authored
Merge pull request #400 from seleniumbase/pytest-update
Pytest update
2 parents b8ef5ef + 43210b2 commit e88c532

File tree

5 files changed

+27
-10
lines changed

5 files changed

+27
-10
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_f3.png" title="SeleniumBase" align="center" height="120">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
1+
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_b.png" title="SeleniumBase" height="48">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
22

33
[<img src="https://img.shields.io/github/release/seleniumbase/SeleniumBase.svg" alt=" " />](https://github.com/seleniumbase/SeleniumBase/releases) [<img src="https://dev.azure.com/seleniumbase/seleniumbase/_apis/build/status/seleniumbase.SeleniumBase?branchName=master" alt=" " />](https://dev.azure.com/seleniumbase/seleniumbase/_build/latest?definitionId=1&branchName=master) [<img src="https://travis-ci.org/seleniumbase/SeleniumBase.svg?branch=master" alt=" " />](https://travis-ci.org/seleniumbase/SeleniumBase) [<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt=" " />](https://gitter.im/seleniumbase/SeleniumBase) [<img src="https://img.shields.io/badge/license-MIT-22BBCC.svg" alt=" " />](https://github.com/seleniumbase/SeleniumBase/blob/master/LICENSE) [<img src="https://img.shields.io/github/stars/seleniumbase/seleniumbase.svg" alt=" " />](https://github.com/seleniumbase/SeleniumBase/stargazers)
44

5-
Reliable Automated Testing with [Selenium WebDriver](https://www.seleniumhq.org/) & [pytest](https://docs.pytest.org/en/latest/). SeleniumBase includes tools for [visual testing](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md), [automation-assisted validation](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md), and [user onboarding](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md).
5+
Reliable Automated Testing with [Selenium WebDriver](https://www.seleniumhq.org/) and [pytest](https://docs.pytest.org/en/latest/). Includes tools for [visual testing](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md), [automation-assisted manual validation](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md), and [user onboarding](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md).
66

7-
<img src="https://cdn2.hubspot.net/hubfs/100006/sb_demo_mode.gif" title="SeleniumBase" height="236"><br />
8-
(<i>Try running [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) from [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) in Demo Mode.</i>)<br />
7+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/my_first_test_gif.gif" title="SeleniumBase"><br />
8+
(<i>Above: [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) from [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) in Demo Mode.</i>)<br />
99
```
1010
pytest my_first_test.py --demo
1111
```
1212

13-
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/super_logo_3.png" title="SeleniumBase" height="48">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
13+
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_f3.png" title="SeleniumBase" align="center" height="120">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
1414

1515
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Get Started:
1616

examples/test_fail.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
""" This test was made to fail on purpose to demonstrate the
2-
logging capabilities of the SeleniumBase Test Framework """
1+
""" This test fails on purpose to demonstrate
2+
the logging capabilities of SeleniumBase.
3+
>>> pytest test_fail.py --html=report.html
4+
This creates ``report.html`` with details.
5+
(Also find log files in ``latest_logs/``) """
36

47
import pytest
58
from seleniumbase import BaseCase

examples/xpath_test.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
""" NOTE: Using CSS Selectors is better than using XPath!
2+
XPath Selectors break very easily with website changes. """
3+
4+
from seleniumbase import BaseCase
5+
6+
7+
class MyTestClass(BaseCase):
8+
9+
def test_xpath(self):
10+
self.open("https://xkcd.com/1319/")
11+
self.assert_element('//img')
12+
self.assert_element('/html/body/div[2]/div[2]/img')
13+
self.click("//ul/li[6]/a")
14+
self.assert_text("xkcd.com", "//h2")

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ selenium==3.141.0
1313
pluggy>=0.13.0
1414
attrs>=19.3.0
1515
pytest>=4.6.6;python_version<"3"
16-
pytest>=5.2.1;python_version>="3"
16+
pytest>=5.2.2;python_version>="3"
1717
pytest-cov>=2.8.1
1818
pytest-forked>=1.1.3
1919
pytest-html==1.22.0

setup.py

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

4646
setup(
4747
name='seleniumbase',
48-
version='1.32.16',
48+
version='1.32.17',
4949
description='Fast, Easy, and Reliable Browser Automation & Testing.',
5050
long_description=long_description,
5151
long_description_content_type='text/markdown',
@@ -96,7 +96,7 @@
9696
'pluggy>=0.13.0',
9797
'attrs>=19.3.0',
9898
'pytest>=4.6.6;python_version<"3"', # For Python 2 compatibility
99-
'pytest>=5.2.1;python_version>="3"',
99+
'pytest>=5.2.2;python_version>="3"',
100100
'pytest-cov>=2.8.1',
101101
'pytest-forked>=1.1.3',
102102
'pytest-html==1.22.0', # Keep at 1.22.0 unless tested on Windows

0 commit comments

Comments
 (0)