Skip to content

Commit de9802a

Browse files
authored
Merge pull request #447 from seleniumbase/bump-pytest-version
Bump pytest version to >= 5.3.2 (Python 3)
2 parents 721bbe6 + 183b0ad commit de9802a

File tree

6 files changed

+26
-39
lines changed

6 files changed

+26
-39
lines changed

README.md

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

55
All-in-one framework for web automation, end-to-end testing, and website tours. SeleniumBase uses [pytest](https://pytest.org) for running Python scripts, while using [Selenium WebDriver](https://selenium.dev/) for controlling web browsers.
66

7-
* Fast & Reliable [Python methods](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md).
7+
* Fast, Reliable [Python methods](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md).
88
* Flexible [command-line options](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md).
99
* Includes web & mobile testing.
1010
* Includes a [website tour builder](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md).
@@ -92,7 +92,7 @@ self.save_screenshot(FILE_NAME) # Save a screenshot of the current page
9292
```
9393
For the complete list of SeleniumBase methods, see: **[help_docs/method_summary.md](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md)**
9494

95-
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_dh.png" title="SeleniumBase" align="center" height="145">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
95+
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_dh.png" title="SeleniumBase" align="center" height="155">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
9696

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

@@ -102,11 +102,14 @@ SeleniumBase automatically handles common WebDriver actions such as spinning up
102102
#### **Simplified code:**<br />
103103
SeleniumBase uses simple syntax for commands, such as:
104104
```python
105-
self.update_text("textarea", "text")
105+
self.update_text("input", "dogs\n")
106106
```
107107
The same command with regular WebDriver is very messy:
108+
(<i>And it doesn't include SeleniumBase smart-waiting.</i>)
108109
```python
109-
self.driver.find_element_by_css_selector("textarea").send_keys("text")
110+
self.driver.find_element_by_css_selector("input").clear() # Not always needed
111+
self.driver.find_element_by_css_selector("input").send_keys("dogs")
112+
self.driver.find_element_by_css_selector("input").submit()
110113
```
111114
(<i>You can still use ``self.driver`` in your code.</i>)
112115

examples/ReadMe.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Run an example test in Headless Mode: (invisible web browser)
3030
pytest my_first_test.py --headless
3131
```
3232

33-
Run tests with verbose output per test: (improves logging)
33+
Run tests with verbose output: (includes more details)
3434
```bash
3535
pytest test_suite.py -v
3636
```
3737

3838
Run tests multi-threaded using [n] threads:
3939
```bash
40-
pytest test_suite.py -n=4
40+
pytest test_suite.py -v -n=4
4141
```
4242

4343
Run a parameterized test, which generates multiple tests out of one:
@@ -47,7 +47,7 @@ pytest parameterized_test.py -v
4747

4848
Run an example test suite and generate a pytest report: (pytest-only)
4949
```bash
50-
pytest test_suite.py --html=report.html
50+
pytest test_suite.py -v --html=report.html
5151
```
5252

5353
Run a failing test: (See the ``latest_logs/`` folder for logs and screenshots)

help_docs/features_list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<a id="feature_list"></a>
44
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> **Features:**
55
* A complete test automation framework for building & running reliable testing scripts.
6-
* Uses [Pytest](https://docs.pytest.org/en/latest/) and [Nose](http://nose.readthedocs.io/en/latest/) runners for test discovery, organization, execution, and logging.
6+
* Uses [Pytest](https://docs.pytest.org/en/latest/) or [Nose](http://nose.readthedocs.io/en/latest/) runners for test discovery, organization, execution, and logging.
77
* Includes [console scripts](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md) that save you time by installing web drivers automatically, etc.
88
* Includes a [website tour builder](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md) for creating and running walkthroughs on any website.
99
* Works on multiple platforms such as macOS, Windows, Linux, and [Docker](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/docker/ReadMe.md).

help_docs/method_summary.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@ For backwards compatibility, older versions of method names have remained to kee
77

88
```python
99
self.open(url)
10-
11-
self.open_url(url)
12-
13-
self.get(url)
14-
15-
self.visit(url)
10+
# Duplicates: self.open_url(url), self.get(url), self.visit(url)
1611

1712
self.click(selector, by=By.CSS_SELECTOR, timeout=None, delay=0)
1813

@@ -22,29 +17,23 @@ self.double_click(selector, by=By.CSS_SELECTOR, timeout=None)
2217

2318
self.click_chain(selectors_list, by=By.CSS_SELECTOR, timeout=None, spacing=0)
2419

25-
self.type(selector, text, by=By.CSS_SELECTOR, timeout=None, retry=False)
26-
27-
self.input(selector, text, by=By.CSS_SELECTOR, timeout=None, retry=False)
28-
2920
self.update_text(selector, new_value, by=By.CSS_SELECTOR, timeout=None, retry=False)
21+
# Duplicates: self.type(selector, text, by=By.CSS_SELECTOR, timeout=None, retry=False)
22+
# self.input(selector, text, by=By.CSS_SELECTOR, timeout=None, retry=False)
3023

3124
self.add_text(selector, text, by=By.CSS_SELECTOR, timeout=None)
32-
33-
self.send_keys(selector, text, by=By.CSS_SELECTOR, timeout=None)
25+
# Duplicates: self.send_keys(selector, text, by=By.CSS_SELECTOR, timeout=None)
3426

3527
self.submit(selector, by=By.CSS_SELECTOR)
3628

37-
self.refresh_page()
38-
39-
self.refresh()
29+
self.refresh() # Also self.refresh_page()
4030

4131
self.get_current_url()
4232

4333
self.get_page_source()
4434

45-
self.get_page_title()
46-
4735
self.get_title()
36+
# Duplicates: self.get_page_title()
4837

4938
self.go_back()
5039

@@ -70,9 +59,8 @@ self.get_link_text_attribute(link_text, attribute, hard_fail)
7059

7160
self.get_partial_link_text_attribute(link_text, attribute, hard_fail)
7261

73-
self.click_link_text(link_text, timeout=None)
74-
7562
self.click_link(link_text, timeout=None)
63+
# Duplicates: self.click_link_text(link_text, timeout=None)
7664

7765
self.click_partial_link_text(partial_link_text, timeout=None)
7866

@@ -333,9 +321,8 @@ self.generate_traffic_chain(pages, loops=1)
333321

334322
self.wait_for_element_present(selector, by=By.CSS_SELECTOR, timeout=None)
335323

336-
self.wait_for_element_visible(selector, by=By.CSS_SELECTOR, timeout=None)
337-
338324
self.wait_for_element(selector, by=By.CSS_SELECTOR, timeout=None)
325+
# Duplicates: self.wait_for_element_visible(selector, by=By.CSS_SELECTOR, timeout=None)
339326

340327
self.get_element(selector, by=By.CSS_SELECTOR, timeout=None)
341328

@@ -344,17 +331,15 @@ self.assert_element_present(selector, by=By.CSS_SELECTOR, timeout=None)
344331
self.find_element(selector, by=By.CSS_SELECTOR, timeout=None)
345332

346333
self.assert_element(selector, by=By.CSS_SELECTOR, timeout=None)
347-
348-
self.assert_element_visible(selector, by=By.CSS_SELECTOR, timeout=None)
334+
# Duplicates: self.assert_element_visible(selector, by=By.CSS_SELECTOR, timeout=None)
349335

350336
########
351337

352-
self.wait_for_text_visible(text, selector="html", by=By.CSS_SELECTOR, timeout=None)
338+
self.wait_for_text(text, selector="html", by=By.CSS_SELECTOR, timeout=None)
339+
# Duplicates: self.wait_for_text_visible(text, selector="html", by=By.CSS_SELECTOR, timeout=None)
353340

354341
self.wait_for_exact_text_visible(text, selector="html", by=By.CSS_SELECTOR, timeout=None)
355342

356-
self.wait_for_text(text, selector="html", by=By.CSS_SELECTOR, timeout=None)
357-
358343
self.find_text(text, selector="html", by=By.CSS_SELECTOR, timeout=None)
359344

360345
self.assert_text_visible(text, selector="html", by=By.CSS_SELECTOR, timeout=None)
@@ -369,9 +354,8 @@ self.wait_for_link_text_present(link_text, timeout=None)
369354

370355
self.wait_for_partial_link_text_present(link_text, timeout=None)
371356

372-
self.wait_for_link_text_visible(link_text, timeout=None)
373-
374357
self.wait_for_link_text(link_text, timeout=None)
358+
# Duplicates: self.wait_for_link_text_visible(link_text, timeout=None)
375359

376360
self.find_link_text(link_text, timeout=None)
377361

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.1
1414
attrs>=19.3.0
1515
pytest>=4.6.7;python_version<"3"
16-
pytest>=5.3.1;python_version>="3"
16+
pytest>=5.3.2;python_version>="3"
1717
pytest-cov>=2.8.1
1818
pytest-forked>=1.1.3
1919
pytest-html==1.22.1;python_version<"3.6"

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.34.2',
48+
version='1.34.3',
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.1',
9797
'attrs>=19.3.0',
9898
'pytest>=4.6.7;python_version<"3"', # For Python 2 compatibility
99-
'pytest>=5.3.1;python_version>="3"',
99+
'pytest>=5.3.2;python_version>="3"',
100100
'pytest-cov>=2.8.1',
101101
'pytest-forked>=1.1.3',
102102
'pytest-html==1.22.1;python_version<"3.6"',

0 commit comments

Comments
 (0)