Skip to content

Commit a05f988

Browse files
committed
Verifying WebDrivers gets its own help doc
1 parent fef012a commit a05f988

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Windows:
4242
* OPTIONAL: [Download PhantomJS](https://bitbucket.org/ariya/phantomjs/downloads) (only if you want to run headless browser automation)
4343
* For everything you download, put those files in your PATH. (``Environmental Variables`` on a Windows machine)
4444

45+
If you want to verify that you successfully installed the web drivers, **[follow these instructions](https://github.com/mdmintz/SeleniumBase/blob/master/help_docs/verify_webdriver.md)**.
4546

4647
#### **Step 1:** Download or Clone SeleniumBase to your local machine
4748

@@ -75,19 +76,7 @@ SeleniumBase is [in Pypi](https://pypi.python.org/pypi/seleniumbase), which mean
7576
pip install seleniumbase
7677
```
7778

78-
#### **Step 4:** Verify that Selenium and Chromedriver were successfully installed by checking inside a python command prompt. (NOTE: xkcd is a webcomic)
79-
80-
```bash
81-
python
82-
>>> from selenium import webdriver
83-
>>> browser = webdriver.Chrome()
84-
>>> browser.get("http://xkcd.com/1337/")
85-
>>> browser.close()
86-
>>> exit()
87-
```
88-
89-
90-
#### **Step 5:** Verify that SeleniumBase was successfully installed by running the example test
79+
#### **Step 4:** Verify that SeleniumBase was successfully installed by running the example test
9180

9281
You can verify the installation of SeleniumBase by running a simple script to perform basic actions such as navigating to a web page, clicking, waiting for page elements to appear, typing in text, scraping text on a page, and verifying text. This may be a good time to read up on CSS selectors. If you use Chrome, you can right-click on a page and select "Inspect Element" to see the details you need to create such a script. With CSS selectors, dots represent class names and pound signs represent IDs.
9382

@@ -178,7 +167,7 @@ py.test my_first_test.py --with-selenium --with-testing_base --browser=firefox -
178167

179168
(NOTE: The ``--with-testing_base`` plugin gives you full logging on test failures for screenshots, page source, and basic test info.)
180169

181-
#### **Step 6:** Complete the setup
170+
#### **Step 5:** Complete the setup
182171

183172
If you're planning on using the full power of this test framework, there are a few more things you'll want to do:
184173

help_docs/verify_webdriver.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
### Verify that Selenium and WebDrivers were successfully installed
2+
3+
**You can do this by checking inside a Python command prompt. (NOTE: xkcd is a webcomic)**
4+
5+
#### Verifying FirefoxDriver (comes with Selenium by default)
6+
```bash
7+
python
8+
>>> from selenium import webdriver
9+
>>> browser = webdriver.Firefox()
10+
>>> browser.get("http://xkcd.com/1337/")
11+
>>> browser.close()
12+
>>> exit()
13+
```
14+
15+
#### Verifying ChromeDriver (you had to install this separately)
16+
```bash
17+
python
18+
>>> from selenium import webdriver
19+
>>> browser = webdriver.Chrome()
20+
>>> browser.get("http://xkcd.com/1337/")
21+
>>> browser.close()
22+
>>> exit()
23+
```

0 commit comments

Comments
 (0)