File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -480,11 +480,13 @@ self.execute_script("return jQuery('div#amazing')[0].text") # Returns the css "
480
480
self .execute_script(" return jQuery('textarea')[2].value" ) # Returns the css "value" of the 3rd textarea element on the page
481
481
```
482
482
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:
484
484
``` 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)
488
490
self .click(" a.analytics" ) # Clicks the generated button
489
491
```
490
492
You can’t perform that action at this time.
0 commit comments