Skip to content

Commit 0f6f2ee

Browse files
authored
Merge pull request #228 from seleniumbase/case-insensitive-console-scripts
Case insensitive console scripts
2 parents ac32d8a + 6115d21 commit 0f6f2ee

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,40 @@ A complete framework for web automation, end-to-end testing, and [user-onboardin
88

99
(<i>Requires [Git](https://git-scm.com/) and [Python](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>)
1010

11-
Clone SeleniumBase from GitHub:
11+
#### Clone SeleniumBase from GitHub:
1212
```
1313
git clone https://github.com/seleniumbase/SeleniumBase.git
1414
```
1515

16-
Upgrade [pip](https://pypi.org/project/pip/) and [setuptools](https://pypi.org/project/setuptools/) if you don't have the latest versions: (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).)
16+
#### Upgrade [pip](https://pypi.org/project/pip/) and [setuptools](https://pypi.org/project/setuptools/) to the latest versions:
17+
18+
* (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.)
1719
```
1820
python -m pip install -U pip setuptools
1921
```
2022

21-
Install SeleniumBase:
23+
#### Install SeleniumBase:
2224
```
2325
cd SeleniumBase
2426
pip install -U -r requirements.txt
25-
python setup.py develop
27+
python setup.py install
2628
```
29+
* (<i>If you'll be customizing seleniumbase, use:</i><br> ``python setup.py develop``<br><i>See https://stackoverflow.com/a/19048754</i>)
2730

28-
Install a web driver to the [seleniumbase/drivers](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/drivers) folder:
31+
#### Install a web driver to the [seleniumbase/drivers](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/drivers) folder:
2932
```
3033
seleniumbase install chromedriver
3134
```
3235

33-
Run a test on chrome:
36+
#### Run a test on chrome:
3437
```
3538
cd examples
3639
pytest my_first_test.py --browser=chrome
3740
```
3841

39-
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 ``ie``.
42+
(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.)
4043

41-
<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_box2.png" title="SeleniumBase" height="64">
44+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_box2.png" title="SeleniumBase" height="32">
4245

4346
SeleniumBase has a very flexible [command line interface](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md) to change how your tests run.
4447

@@ -51,9 +54,11 @@ pytest my_first_test.py --demo_mode
5154
<img src="https://cdn2.hubspot.net/hubfs/100006/sb_demo_mode.gif" title="SeleniumBase" height="270"><br>
5255
(Above: Actual demo of [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) running on [xkcd.com](https://xkcd.com/353/))
5356

54-
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.
57+
There are <b>many more examples</b> to try out from the [SeleniumBase/examples](https://github.com/seleniumbase/SeleniumBase/blob/master/examples) folder, which you can run easily if you clone SeleniumBase.
58+
59+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_box2.png" title="SeleniumBase" height="32">
5560

56-
Try out SeleniumBase Website Tours (from the ``examples/tour_examples`` folder). It's the best website onboarding experience available (and it's free too). Find the [WebSite Tours ReadMe here](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md).
61+
Check out [SeleniumBase Website Tours](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/tour_examples) (in the ``examples/tour_examples`` folder). It's the best website onboarding experience available (and it's free too). Find the [Tours ReadMe here](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md).
5762

5863
```
5964
cd tour_examples
@@ -63,6 +68,8 @@ pytest google_tour.py
6368
<img src="https://cdn2.hubspot.net/hubfs/100006/google_tour_3.gif" title="SeleniumBase Tour of Google" height="260"><br>
6469
(Above: Actual demo of [google_tour.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/google_tour.py) running on [google.com](https://google.com))
6570

71+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_box2.png" title="SeleniumBase" height="32">
72+
6673
For more detailed steps on getting started, see the [**Detailed Instructions**](#seleniumbase_installation) section.
6774

6875
## <img src="https://cdn2.hubspot.net/hubfs/100006/images/sb_logo_box2.png" title="SeleniumBase" height="32"> Learn More:
@@ -142,7 +149,7 @@ If you're installing SeleniumBase from a cloned copy on your machine, use:
142149
cd SeleniumBase
143150
144151
pip install -r requirements.txt --upgrade
145-
python setup.py develop
152+
python setup.py install
146153
```
147154

148155
If you're installing SeleniumBase from the [Python Package Index](https://pypi.python.org/pypi/seleniumbase), use:

seleniumbase/console_scripts/run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ def show_detailed_help():
137137

138138

139139
def main():
140+
command = None
141+
command_args = None
140142
num_args = len(sys.argv)
141143
if num_args == 1:
142144
show_usage()
@@ -147,6 +149,7 @@ def main():
147149
elif num_args > 2:
148150
command = sys.argv[1]
149151
command_args = sys.argv[2:]
152+
command = command.lower()
150153

151154
if command == "install":
152155
if len(command_args) >= 1:

seleniumbase/console_scripts/sb_install.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ def make_executable(file_path):
5454

5555
def main():
5656
num_args = len(sys.argv)
57-
if sys.argv[0].split('/')[-1] == "seleniumbase" or (
58-
sys.argv[0].split('\\')[-1] == "seleniumbase"):
57+
if sys.argv[0].split('/')[-1].lower() == "seleniumbase" or (
58+
sys.argv[0].split('\\')[-1].lower() == "seleniumbase"):
5959
if num_args < 3 or num_args > 3:
6060
invalid_run_command()
6161
else:
6262
invalid_run_command()
63-
name = sys.argv[num_args - 1]
63+
name = sys.argv[num_args - 1].lower()
6464

6565
file_name = None
6666
download_url = None

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
setup(
1919
name='seleniumbase',
20-
version='1.16.11',
20+
version='1.16.12',
2121
description='All-In-One Test Automation Framework',
2222
long_description=long_description,
2323
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)