Last change
on this file since 31525 was 31525, checked in by ak19, 7 years ago |
Nathan provided more stuff: Themes folder contains Sencha's Themebuilder which generates GXT Themes. It includes the .theme and generated .jar files for the project theme.
|
File size:
468 bytes
|
Line | |
---|
1 | # Modify global object at the page initialization.
|
---|
2 | # In this example, effectively Math.random() always returns 0.42.
|
---|
3 |
|
---|
4 | page = require('webpage').create()
|
---|
5 | page.onInitialized = ->
|
---|
6 | page.evaluate ->
|
---|
7 | Math.random = ->
|
---|
8 | 42 / 100
|
---|
9 |
|
---|
10 | page.open "http://ariya.github.com/js/random/", (status) ->
|
---|
11 | if status != "success"
|
---|
12 | console.log "Network error."
|
---|
13 | else
|
---|
14 | console.log page.evaluate(->
|
---|
15 | document.getElementById("numbers").textContent
|
---|
16 | )
|
---|
17 | phantom.exit()
|
---|
18 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.