Skip to content

Commit a54d252

Browse files
committed
Merge pull request #12 from mdmintz/readme-into-help-docs
Break out ReadMe into smaller help docs
2 parents 66e0be8 + 9951a80 commit a54d252

File tree

5 files changed

+117
-123
lines changed

5 files changed

+117
-123
lines changed

README.md

+12-123
Original file line numberDiff line numberDiff line change
@@ -17,171 +17,60 @@
1717

1818
#### **Step 0:** Get the requirements
1919

20-
#### [Python 2.7](https://www.python.org/downloads/)
20+
If you don't already have ``python``, ``pip``, ``git``, and either ``virtualenv`` or ``virtualenvwrapper`` installed and accessible from your terminal (command prompt), you'll need to [follow these instructions](https://github.com/mdmintz/SeleniumBase/blob/master/help_docs/requirements_installation.md) to get those installed.
2121

22-
If you're a MAC user, that should already come preinstalled on your machine. Although Python 3 exists, you'll want Python 2 (both of these major versions are being improved in parallel). Python 2.7.10 is the one I've been using on my Mac.
23-
24-
If you're a WINDOWS user, [download the latest 2.* version from here](https://www.python.org/downloads/release/python-2710/).
25-
26-
#### [Pip](https://en.wikipedia.org/wiki/Pip_%28package_manager%29)
27-
28-
If "pip" did not come with your Python installation, you can [GET PIP HERE](https://pip.pypa.io/en/latest/installing/), and make sure it's on your path.
29-
30-
#### [Homebrew](http://brew.sh/) + [Git](http://git-scm.com/) (OPTIONAL)
31-
32-
(NOTE: You can download the SeleniumBase repository right from GitHub and skip all the git-related commands. That's probably the fastest way if you want to quickly get a live demo of this tool up and running.)
33-
34-
```bash
35-
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
36-
brew install git
37-
brew update
38-
```
39-
40-
(WINDOWS users: Skip the Homebrew part and [download Git here](http://git-scm.com/download).)
41-
42-
#### [MySQL](http://www.mysql.com/) (OPTIONAL)
43-
44-
(NOTE: If you're using this test framework from a local development machine and don't plan on writing to a MySQL DB from your local test runs, you can skip this step.)
45-
46-
Mac:
47-
48-
```bash
49-
brew install MySQL
50-
```
51-
52-
Windows: [Download MySQL here](http://dev.mysql.com/downloads/windows/)
53-
54-
That installs the MySQL library so that you can use db commands in your code. To make that useful, you'll want to have a MySQL DB that you can connect to. You'll also want to use the testcaserepository.sql file from the seleniumbase/core folder to add the necessary tables.
55-
56-
If you want a visual tool to help make your MySQL life easier, [try MySQL Workbench](http://dev.mysql.com/downloads/workbench/).)
57-
58-
#### [Virtualenv](http://virtualenv.readthedocs.org/en/latest/)
59-
60-
Mac: (The old regular way):
61-
62-
```bash
63-
sudo easy_install virtualenv
64-
```
65-
66-
Mac: (The new fancy way):
67-
68-
```bash
69-
sudo easy_install virtualenvwrapper
70-
```
71-
72-
Windows:
73-
74-
```bash
75-
pip install virtualenv
76-
```
22+
If you plan on storing data in a MySQL DB (OPTIONAL), you'll need to [follow these instructions](https://github.com/mdmintz/SeleniumBase/blob/master/help_docs/mysql_installation.md) to get that installed.
7723

7824
#### [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/) and [PhantomJS](http://phantomjs.org/)
7925

26+
If you want to run automation on browsers other than Firefox (such as Chrome), you'll need to download drivers for those separately, and that means you may need to install ``brew`` (aka ``homebrew``) if you're using a Mac. You may have previously installed ``brew`` if you used that a few steps above to install ``git``.
27+
8028
Mac:
8129

8230
```bash
8331
brew install chromedriver phantomjs
8432
```
8533

86-
Windows: [Download Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads) and put it in your PATH. Next, [Download PhantomJS](https://bitbucket.org/ariya/phantomjs/downloads) and also put that in your PATH.
87-
88-
(NOTE: There are web drivers for other web browsers as well. These two will get you started.)
89-
34+
Windows: [Download Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads) and put it in your PATH. Next, [Download PhantomJS](https://bitbucket.org/ariya/phantomjs/downloads) (OPTIONAL - if you want to run headless browser automation) and also put that in your PATH.
9035
If you haven't already, you'll want to [Download Firefox](https://www.mozilla.org/en-US/firefox/new/) and either [Download Chrome](https://www.google.com/chrome/browser/desktop/index.html) or [Download Chromium](https://download-chromium.appspot.com/).
9136

92-
9337
#### **Step 1:** Download or Clone SeleniumBase to your local machine
9438

95-
If you're using Git, you can fork the repository on GitHub to create your personal copy. This is important because you'll want to add your own configurations, credentials, settings, etc. Now you can clone your forked copy to your personal computer. You can use a tool such as [SourceTree](http://www.sourcetreeapp.com/) to make things easier by providing you with a simple-to-use user interface for viewing and managing your git commits and status.
96-
97-
```bash
98-
git clone [LOCATION OF YOUR FORKED SELENIUMBASE GITHUB FOLDER]/SeleniumBase.git
99-
cd SeleniumBase
100-
```
101-
102-
If you only need a local copy and don't plan on checking in any changes that you make, you can just clone the base repo as is:
103-
10439
```bash
10540
git clone https://github.com/mdmintz/SeleniumBase.git
41+
cd SeleniumBase
10642
```
10743

108-
#### **Step 2:** Create a virtualenv for seleniumbase
109-
110-
Mac: (If you're using the old regular way):
111-
112-
```bash
113-
mkdir -p ~/Envs
114-
virtualenv ~/Envs/seleniumbase
115-
source ~/Envs/seleniumbase/bin/activate
116-
```
117-
118-
Mac: (If you're using the new fancy way):
44+
(You can use a tool such as [SourceTree](http://www.sourcetreeapp.com/) to make things easier by providing you with a simple-to-use user interface for viewing and managing your git commits and status.)
11945

120-
```bash
121-
mkvirtualenv seleniumbase
122-
```
123-
124-
Windows:
12546

126-
Use the "virtualenv" version above instead of "mkvirtualenv", but also make the following changes:
127-
1: Don't use "-p"
128-
2: Replace "~/" from above with the location of your home directory
129-
3: Instead of using the "source" command, go into the folder created and type ``activate``
47+
#### **Step 2:** Create a virtualenv for seleniumbase and activate it
13048

131-
If you ever need to leave your virtual environment, use the following command:
49+
If you're not sure how to create a virtual environment, [follow these instructions](https://github.com/mdmintz/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md) to learn how.
13250

133-
```bash
134-
deactivate
135-
```
136-
137-
You can always jump back in later:
138-
139-
(If you're using the old regular way):
140-
```bash
141-
source ~/Envs/seleniumbase/bin/activate
142-
```
143-
144-
(If you're using the new fancy way):
145-
```bash
146-
workon seleniumbase
147-
```
14851

14952
#### **Step 3:** Install necessary packages from the SeleniumBase folder and compile the test framework (from within your virtual environment)
15053

151-
If you don't desire connecting to a MySQL DB to record the results of your local test runs, run this command:
152-
15354
```bash
15455
pip install -r requirements.txt
15556
```
156-
The "-e ." at the end of requirements.txt should automatically trigger setup.py installation from the following command:
57+
15758
```bash
15859
python setup.py install
15960
```
16061

161-
If you do desire connecting to a MySQL DB to record the results of your test runs, run this command: (Make sure you already have MySQL installed from either Brew or web-download. If you're a WINDOWS user, you may have problems on the MySQL installation part. To get around this, you can either follow the instructions from the error message given, or you can pip install the previous requirements.txt file.)
62+
If you want to connect to a MySQL DB to record the results of your test runs, run this command: (Make sure you already have MySQL installed from either Brew or web-download. If you're a WINDOWS user, you may have problems on the MySQL installation part. To get around this, you can either follow the instructions from the error message given, or you can pip install the previous requirements.txt file.)
16263

16364
```bash
164-
pip install -r server_requirements.txt
65+
pip install -r server_requirements.txt # For MySQL DB usage ONLY!
16566
```
16667

167-
As mentioned before, the "-e ." in that file should automatically trigger installation of setup.py
168-
16968
NOTE:
17069

171-
(From a virtual environment, it should not be necessary to add "sudo" before those commands above.)
172-
173-
In some cames, certain packages will have other dependencies as requirements, and those will get installed automatically. You'll be able to see all installed packages in your virtual environment by using the following command:
174-
175-
```bash
176-
pip freeze
177-
```
178-
17970
By default, some files may be hidden on a MAC, such as .gitignore (which is used to tell Git which files to ignore for staging commits). To view all files from the Finder window, run the following command in a terminal window:
180-
18171
```bash
18272
defaults write com.apple.finder AppleShowAllFiles -bool true
18373
```
184-
18574
(You may need to reopen the MAC Finder window to see changes from that.)
18675

18776

help_docs/ReadMe.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#### Additional Help Documents
2+
3+
This folder contains additional documents to help guide you with requirements installation, setup, and more.

help_docs/mysql_installation.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
### MySQL Installation Instructions
2+
3+
4+
#### [MySQL](http://www.mysql.com/) (OPTIONAL)
5+
6+
(NOTE: If you're using this test framework from a local development machine and don't plan on writing to a MySQL DB from your local test runs, you can skip this step.)
7+
8+
Mac:
9+
10+
```bash
11+
brew install MySQL
12+
```
13+
14+
Windows: [Download MySQL here](http://dev.mysql.com/downloads/windows/)
15+
16+
That installs the MySQL library so that you can use db commands in your code. To make that useful, you'll want to have a MySQL DB that you can connect to. You'll also want to use the testcaserepository.sql file from the seleniumbase/core folder to add the necessary tables.
17+
18+
If you want a visual tool to help make your MySQL life easier, [try MySQL Workbench](http://dev.mysql.com/downloads/workbench/).
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
### Installation Instructions for Python, pip, brew, git, and virtualenv (or virtualenvwrapper)
2+
3+
4+
#### [Python 2.7](https://www.python.org/downloads/)
5+
6+
If you're a MAC user, that should already come preinstalled on your machine. Although Python 3 exists, you'll want Python 2 (both of these major versions are being improved in parallel). Python 2.7.10 is the one I've been using on my Mac.
7+
8+
If you're a WINDOWS user, [download the latest 2.* version from here](https://www.python.org/downloads/release/python-2710/).
9+
10+
#### [Pip](https://en.wikipedia.org/wiki/Pip_%28package_manager%29)
11+
12+
If "pip" did not come with your Python installation, you can [GET PIP HERE](https://pip.pypa.io/en/latest/installing/), and make sure it's on your path.
13+
14+
#### [Homebrew](http://brew.sh/) + [Git](http://git-scm.com/) (OPTIONAL)
15+
16+
(NOTE: You can download the SeleniumBase repository right from GitHub and skip all the git-related commands. That's probably the fastest way if you want to quickly get a live demo of this tool up and running.)
17+
18+
```bash
19+
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
20+
brew update
21+
brew install git
22+
```
23+
24+
(WINDOWS users: Skip the Homebrew part and [download Git here](http://git-scm.com/download).)
25+
26+
#### [Virtualenv](http://virtualenv.readthedocs.org/en/latest/) or [Virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/en/latest/)
27+
28+
Mac: (The old regular way):
29+
30+
```bash
31+
sudo easy_install virtualenv
32+
```
33+
34+
Mac: (The new fancy way):
35+
36+
```bash
37+
sudo easy_install virtualenvwrapper
38+
```
39+
40+
Windows:
41+
42+
```bash
43+
pip install virtualenv
44+
```

help_docs/virtualenv_instructions.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
### Virtual Environment Setup Instructions
2+
3+
Mac: (If you're using virtualenv):
4+
5+
```bash
6+
mkdir -p ~/Envs
7+
virtualenv ~/Envs/seleniumbase
8+
source ~/Envs/seleniumbase/bin/activate
9+
```
10+
11+
Mac: (If you're using virtualenvwrapper):
12+
13+
```bash
14+
mkvirtualenv seleniumbase
15+
```
16+
17+
Windows:
18+
19+
Use the "virtualenv" version above instead of "mkvirtualenv", but also make the following changes:
20+
1: Don't use "-p"
21+
2: Replace "~/" from above with the location of your home directory
22+
3: Instead of using the "source" command, go into the folder created and type ``activate``
23+
24+
If you ever need to leave your virtual environment, use the following command:
25+
26+
```bash
27+
deactivate
28+
```
29+
30+
You can always jump back in later:
31+
32+
(If you're using virtualenv):
33+
```bash
34+
source ~/Envs/seleniumbase/bin/activate
35+
```
36+
37+
(If you're using virtualenvwrapper):
38+
```bash
39+
workon seleniumbase
40+
```

0 commit comments

Comments
 (0)