Skip to content

Commit aef9f3f

Browse files
committed
Update the README
1 parent 2363e43 commit aef9f3f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +152,21 @@ defaults write com.apple.finder AppleShowAllFiles -bool true
152152
(You may need to reopen the MAC Finder window to see changes from that.)
153153

154154

155-
#### **Step 4:** Verify that Selenium and Chromedriver were successfully installed by checking inside a python command prompt
155+
#### **Step 4:** Verify that Selenium and Chromedriver were successfully installed by checking inside a python command prompt. (NOTE: xkcd is a webcomic)
156156

157157
```bash
158158
python
159159
>>> from selenium import webdriver
160160
>>> browser = webdriver.Chrome()
161-
>>> browser.get("http://dev.hubspot.com/blog/the-classic-qa-team-is-obsolete")
161+
>>> browser.get("http://xkcd.com/1337/")
162162
>>> browser.close()
163163
>>> exit()
164164
```
165165

166166

167-
#### **Step 5:** Verify that SeleniumBase was successfully installed by running example tests
167+
#### **Step 5:** Verify that SeleniumBase was successfully installed by running the example test
168168

169-
You can verify the installation of SeleniumBase by writing 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. (Copy/paste the following code into a new file called "my_first_test.py"). 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. At a quick glance, dots are for class names and pound signs are for IDs.
169+
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.
170170

171171
```python
172172
from seleniumbase import BaseCase
@@ -179,17 +179,16 @@ class MyTestClass(BaseCase):
179179
self.click('a[rel="license"]')
180180
text = self.wait_for_element_visible('center').text
181181
self.assertTrue("reuse any of my drawings" in text)
182-
self.assertTrue("You can use them freely" in text)
183182
self.open("http://xkcd.com/1481/")
184183
self.click_link_text('Blag')
185-
self.wait_for_text_visible("The blag of the webcomic", "#site-description")
186-
self.update_text_value("input#s", "Robots!\n")
184+
self.wait_for_text_visible("The blag", "header h2")
185+
self.update_text("input#s", "Robots!\n")
187186
self.wait_for_text_visible("Hooray robots!", "#content")
188187
self.open("http://xkcd.com/1319/")
189188
self.wait_for_text_visible("Automation", "div#ctitle")
190189
```
191190

192-
Now try running the script using various web browsers:
191+
Now try running the script (from the "examples" folder) using various web browsers:
193192

194193
```bash
195194
nosetests my_first_test.py --browser=chrome --with-selenium -s
@@ -503,7 +502,7 @@ self.execute_script("return jQuery('div#amazing')[0].text") # Returns the css "
503502
self.execute_script("return jQuery('textarea')[2].value") # Returns the css "value" of the 3rd textarea element on the page
504503
```
505504

506-
In the following more-complex example, jQuery is used to plant code on a page that Selenium can then touch after that:
505+
In the following example, javascript is used to plant code on a page that Selenium can then touch after that:
507506
```python
508507
self.driver.get(SOME_PAGE_TO_PLAY_WITH)
509508
referral_link = '<a class="analytics test" href="%s">Free-Referral Button!</a>' % DESTINATION_URL

0 commit comments

Comments
 (0)