Skip to content

Commit a4f983a

Browse files
committed
Use self.open() instead of self.driver.get()
1 parent 2ece5e7 commit a4f983a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ from seleniumbase import BaseCase
290290
class MyTestClass(BaseCase):
291291

292292
def test_find_army_of_robots_on_xkcd_desert_island(self):
293-
self.driver.get("http://xkcd.com/731/")
293+
self.open("http://xkcd.com/731/")
294294
self.wait_for_element_visible("div#ARMY_OF_ROBOTS", timeout=3) # This should fail
295295
```
296296
Now run it:
@@ -309,7 +309,7 @@ Have you made it this far? Congratulations!!! Now you're ready to dive in at ful
309309
#### Navigating to a Page, Plus Some Other Useful Related Commands
310310

311311
```python
312-
self.driver.get("https://xkcd.com/378/") # Instant navigation to any web page.
312+
self.open("https://xkcd.com/378/") # Instant navigation to any web page.
313313

314314
self.driver.refresh() # refresh/reload the current page.
315315

@@ -504,7 +504,7 @@ self.execute_script("return jQuery('textarea')[2].value") # Returns the css "va
504504

505505
In the following example, javascript is used to plant code on a page that Selenium can then touch after that:
506506
```python
507-
self.driver.get(SOME_PAGE_TO_PLAY_WITH)
507+
self.open(SOME_PAGE_TO_PLAY_WITH)
508508
referral_link = '<a class="analytics test" href="%s">Free-Referral Button!</a>' % DESTINATION_URL
509509
self.execute_script("document.body.innerHTML = \"%s\"" % referral_link)
510510
self.click("a.analytics") # Clicks the generated button

0 commit comments

Comments
 (0)