File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ from seleniumbase import BaseCase
290
290
class MyTestClass (BaseCase ):
291
291
292
292
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/" )
294
294
self .wait_for_element_visible(" div#ARMY_OF_ROBOTS" , timeout = 3 ) # This should fail
295
295
```
296
296
Now run it:
@@ -309,7 +309,7 @@ Have you made it this far? Congratulations!!! Now you're ready to dive in at ful
309
309
#### Navigating to a Page, Plus Some Other Useful Related Commands
310
310
311
311
``` 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.
313
313
314
314
self .driver.refresh() # refresh/reload the current page.
315
315
@@ -504,7 +504,7 @@ self.execute_script("return jQuery('textarea')[2].value") # Returns the css "va
504
504
505
505
In the following example, javascript is used to plant code on a page that Selenium can then touch after that:
506
506
``` python
507
- self .driver.get (SOME_PAGE_TO_PLAY_WITH )
507
+ self .open (SOME_PAGE_TO_PLAY_WITH )
508
508
referral_link = ' <a class="analytics test" href="%s ">Free-Referral Button!</a>' % DESTINATION_URL
509
509
self .execute_script(" document.body.innerHTML = \" %s \" " % referral_link)
510
510
self .click(" a.analytics" ) # Clicks the generated button
You can’t perform that action at this time.
0 commit comments