Skip to content

Commit 283392b

Browse files
authored
Merge pull request #183 from seleniumbase/browser-updates
Browser updates and more
2 parents 2b33a71 + 03feddd commit 283392b

File tree

19 files changed

+235
-59
lines changed

19 files changed

+235
-59
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ nosetests.xml
3939
# Web Drivers
4040
chromedriver
4141
geckodriver
42+
operadriver
4243
MicrosoftWebDriver.exe
44+
IEDriverServer.exe
4345
chromedriver.exe
4446
geckodriver.exe
47+
operadriver.exe
4548

4649
# Logs
4750
logs

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ before_script:
2525
# - "wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 && tar -xvf ./phantomjs-2.1.1-linux-x86_64.tar.bz2 && export PATH=$PWD/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
2626
- "seleniumbase install chromedriver"
2727
- "seleniumbase install geckodriver"
28+
- "seleniumbase mkdir browser_tests"
2829
script:
30+
- "pytest browser_tests/boilerplates/boilerplate_test.py --headless --with-db_reporting"
2931
- "pytest examples/my_first_test.py --browser=chrome -s --headless --with-db_reporting"
3032
- "nosetests examples/boilerplates/boilerplate_test.py --browser=chrome --headless"
3133
- "pytest examples/my_first_test.py --browser=firefox -s --headless --with-db_reporting"

README.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
1-
## SeleniumBase Automation Framework
1+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/logo_base_4b.png" title="SeleniumBase" height="160">
22

3-
<img src="https://cdn2.hubspot.net/hubfs/100006/images/laptop_logo.png" title="SeleniumBase" height="160">
3+
## SeleniumBase &middot; [![](https://img.shields.io/pypi/v/seleniumbase.svg)](https://pypi.python.org/pypi/seleniumbase) [![Build Status](https://travis-ci.org/seleniumbase/SeleniumBase.svg?branch=master)](https://travis-ci.org/seleniumbase/SeleniumBase)<br />
44

5-
[![](https://img.shields.io/pypi/v/seleniumbase.svg)](https://pypi.python.org/pypi/seleniumbase) [![Build Status](https://travis-ci.org/seleniumbase/SeleniumBase.svg?branch=master)](https://travis-ci.org/seleniumbase/SeleniumBase) [![Join the chat at https://gitter.im/seleniumbase/SeleniumBase](https://badges.gitter.im/seleniumbase/SeleniumBase.svg)](https://gitter.im/seleniumbase/SeleniumBase?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br />
5+
SeleniumBase simplifies test automation with [WebDriver](https://docs.microsoft.com/en-us/microsoft-edge/webdriver) & [Pytest](https://github.com/pytest-dev/pytest).
66

7-
SeleniumBase makes it easy to build & run [Selenium-WebDriver](https://github.com/SeleniumHQ/selenium) automation with [Pytest](https://docs.pytest.org/en/latest/).
7+
#### Quick start in a few steps: (requires [Python](https://www.python.org/downloads/))
88

9-
**Watch [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) run in [Demo Mode](#seleniumbase_demo_mode):**<br>
9+
```bash
10+
python -m pip install seleniumbase --upgrade
11+
seleniumbase install chromedriver
12+
seleniumbase mkdir browser_tests
13+
cd browser_tests
14+
pytest my_first_test.py --browser=chrome
15+
```
16+
17+
The ``seleniumbase mkdir [NAME]`` command creates a new folder with some sample tests you can run. If you wish to use a different browser, you can use ``seleniumbase install [DRIVER]`` with other drivers such as ``edgedriver`` (Microsoft Edge) or ``geckodriver`` (Firefox). Then use ``--browser=edge`` or ``--browser=firefox`` to run tests on that browser (assuming you already have that web browser installed). ``--browser=chrome`` is the default option if not specified.
18+
19+
**Slow-motion demo of [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) running:**<br>
1020
![](https://cdn2.hubspot.net/hubfs/100006/images/sb_demo.gif "SeleniumBase")<br>
1121

12-
### [**Get Started**](#seleniumbase_installation), or Learn More:
22+
There are many more examples to try out from the [SeleniumBase/examples](https://github.com/seleniumbase/SeleniumBase/blob/master/examples) directory, which you can run easily if you clone SeleniumBase.
23+
24+
For more detailed steps on getting started, see the [**Detailed Instructions**](#seleniumbase_installation) section.
25+
26+
### Learn More:
1327

1428
**No more repetitive WebDriver code:**<br />
1529
SeleniumBase automatically handles common WebDriver actions such as spinning up web browsers, waiting for page objects to load, saving screenshots during test failures, using a proxy server, and more. (<i>[Read about customizing test runs](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md).</i>)
@@ -29,6 +43,8 @@ pytest my_first_test.py --browser=chrome
2943
nosetests my_test_suite.py --browser=firefox
3044
```
3145

46+
Python methods that start with ``test_`` will automatically be run when using ``pytest`` or ``nosetests`` on a Python file, (<i>or on folders containing Python files</i>).
47+
3248
**No more messy code:**<br />
3349
This long line of standard WebDriver code,
3450
```python
@@ -53,15 +69,15 @@ SeleniumBase is compatible with [Selenium Grid](https://github.com/seleniumbase/
5369
SeleniumBase makes it easy to automate tedious business tasks. (*To learn about businesses using SeleniumBase, [Click Here](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/happy_customers.md).*)
5470

5571
**Extensively tested and made with love:**<br />
56-
SeleniumBase was originally built for [testing HubSpot's platform](https://product.hubspot.com/blog/the-classic-qa-team-is-obsolete) and automating business processes. In 2014, SeleniumBase was open-sourced and spun off as its own independent entity to benefit users everywhere.
72+
SeleniumBase was originally built for [testing HubSpot's platform](https://product.hubspot.com/blog/bid/88880/Automated-Integration-Testing-with-Selenium-at-HubSpot) and automating business processes. In 2014, SeleniumBase was open-sourced and spun off as its own independent entity to benefit users everywhere.
5773

58-
**Contains lots of additional features:**<br />
74+
**Plenty of features:**<br />
5975
([Read more about SeleniumBase features here](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md))
6076

6177
<a id="seleniumbase_installation"></a>
62-
<br><img src="https://cdn2.hubspot.net/hubfs/100006/images/new_logo_pre6c.png" title="SeleniumBase" height="40">
78+
<br><img src="https://cdn2.hubspot.net/hubfs/100006/images/SB_Logo8g.png" title="SeleniumBase" height="40">
6379

64-
## Get Started:
80+
## Detailed Instructions:
6581

6682
Before installation, **[install Python](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/install_python_pip_git.md)** and **[install a web driver](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/webdriver_installation.md)**.
6783

@@ -86,14 +102,14 @@ cd SeleniumBase
86102

87103
If you're installing SeleniumBase from a cloned copy on your machine, use:
88104
```
89-
pip install -r requirements.txt
105+
pip install -r requirements.txt --upgrade
90106
91107
python setup.py develop
92108
```
93109

94110
If you're installing SeleniumBase from the [Python Package Index](https://pypi.python.org/pypi/seleniumbase), use:
95111
```bash
96-
pip install seleniumbase
112+
pip install seleniumbase --upgrade
97113
```
98114

99115
If you're installing SeleniumBase directly from GitHub, use:
@@ -611,10 +627,10 @@ Now you can parse through the email if you're looking for specific text or want
611627

612628
**Congratulations** on learning how to use **SeleniumBase**!
613629

614-
<i>**Questions or Comments?**</i><br>
630+
<i>**Questions or Comments?**</i><br />
615631
[![Join the chat at https://gitter.im/seleniumbase/SeleniumBase](https://badges.gitter.im/seleniumbase/SeleniumBase.svg)](https://gitter.im/seleniumbase/SeleniumBase?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
616632

617633
[https://github.com/mdmintz](https://github.com/mdmintz)<br>
618634
[https://www.linkedin.com/in/mdmintz](https://www.linkedin.com/in/mdmintz)<br>
619635

620-
<img src="https://cdn2.hubspot.net/hubfs/100006/images/new_logo_pre6c.png" title="SeleniumBase" height="40"> <br> <img src="https://cdn2.hubspot.net/hubfs/100006/images/logo_base_4b.png" title="SeleniumBase" height="150">
636+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/new_logo_pre6c.png" title="SeleniumBase" height="40"> <br /> <img src="https://cdn2.hubspot.net/hubfs/100006/images/logo_base_4b.png" title="SeleniumBase" height="150">

console_scripts/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Installs the specified webdriver.
2525
``seleniumbase mkdir [DIRECTORY_NAME]``
2626

2727
* Example:
28-
``seleniumbase mkdir gui_tests``
28+
``seleniumbase mkdir browser_tests``
2929

3030
* Output:
3131
Creates a new folder for running SeleniumBase scripts.

console_scripts/run.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
Examples:
88
seleniumbase install chromedriver
9-
seleniumbase mkdir gui_tests
9+
seleniumbase mkdir browser_tests
1010
seleniumbase convert my_old_webdriver_unittest.py
1111
seleniumbase grid-hub start
1212
seleniumbase grid-node start --hub=127.0.0.1
@@ -47,14 +47,17 @@ def show_install_usage():
4747
print("")
4848
print(" Usage:")
4949
print(" seleniumbase install [DRIVER_NAME]")
50-
print(" (Drivers: chromedriver, geckodriver, edgedriver)")
50+
print(" (Drivers: chromedriver, geckodriver, edgedriver")
51+
print(" iedriver, operadriver)")
5152
print(" Example:")
5253
print(" seleniumbase install chromedriver")
5354
print(" Output:")
5455
print(" Installs the specified webdriver.")
5556
print(" (chromedriver is required for Chrome automation)")
5657
print(" (geckodriver is required for Firefox automation)")
57-
print(" (edgedriver is required for MS Edge automation)")
58+
print(" (edgedriver is required for Microsoft Edge automation)")
59+
print(" (iedriver is required for InternetExplorer automation)")
60+
print(" (operadriver is required for Opera Browser automation)")
5861
print("")
5962

6063

@@ -64,7 +67,7 @@ def show_mkdir_usage():
6467
print(" Usage:")
6568
print(" seleniumbase mkdir [DIRECTORY_NAME]")
6669
print(" Example:")
67-
print(" seleniumbase mkdir gui_tests")
70+
print(" seleniumbase mkdir browser_tests")
6871
print(" Output:")
6972
print(" Creates a new folder for running SeleniumBase scripts.")
7073
print(" The new folder contains default config files,")

0 commit comments

Comments
 (0)