Skip to content

Commit 6f7d76b

Browse files
committed
Update an example in the ReadMe
1 parent 77ee231 commit 6f7d76b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,11 +480,13 @@ self.execute_script("return jQuery('div#amazing')[0].text") # Returns the css "
480480
self.execute_script("return jQuery('textarea')[2].value") # Returns the css "value" of the 3rd textarea element on the page
481481
```
482482

483-
In the following example, javascript is used to plant code on a page that Selenium can then touch after that:
483+
In the following example, JavaScript is used to plant code on a page that Selenium can then touch after that:
484484
```python
485-
self.open(SOME_PAGE_TO_PLAY_WITH)
486-
referral_link = '<a class="analytics test" href="%s">Free-Referral Button!</a>' % DESTINATION_URL
487-
self.execute_script("document.body.innerHTML = \"%s\"" % referral_link)
485+
start_page = "https://xkcd.com/465/"
486+
destination_page = "https://github.com/seleniumbase/SeleniumBase"
487+
self.open(start_page)
488+
referral_link = '''<a class='analytics test' href='%s'>Free-Referral Button!</a>''' % destination_page
489+
self.execute_script('''document.body.innerHTML = \"%s\"''' % referral_link)
488490
self.click("a.analytics") # Clicks the generated button
489491
```
490492

0 commit comments

Comments
 (0)