Update casper.rst
Trying to fix the example code for changing the user-agent. Current example doesn't work.
Showing
1 changed file
with
1 additions
and
2 deletions
... | @@ -1847,10 +1847,9 @@ Sets the `User-Agent string <http://en.wikipedia.org/wiki/User-Agent>`_ to send | ... | @@ -1847,10 +1847,9 @@ Sets the `User-Agent string <http://en.wikipedia.org/wiki/User-Agent>`_ to send |
1847 | 1847 | ||
1848 | casper.thenOpen('http://google.com/', function() { | 1848 | casper.thenOpen('http://google.com/', function() { |
1849 | this.echo("I'm a Mac."); | 1849 | this.echo("I'm a Mac."); |
1850 | casper.userAgent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'); | ||
1850 | }); | 1851 | }); |
1851 | 1852 | ||
1852 | casper.userAgent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'); | ||
1853 | |||
1854 | casper.thenOpen('http://google.com/', function() { | 1853 | casper.thenOpen('http://google.com/', function() { |
1855 | this.echo("I'm a PC."); | 1854 | this.echo("I'm a PC."); |
1856 | }); | 1855 | }); | ... | ... |
-
Please register or sign in to post a comment