Skip to content

Instantly share code, notes, and snippets.

@EndangeredMassa
Created April 12, 2013 06:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EndangeredMassa/5369966 to your computer and use it in GitHub Desktop.
Save EndangeredMassa/5369966 to your computer and use it in GitHub Desktop.
CasperJS and Infinite Redirects
<html>
<meta http-equiv="refresh" content="0" />
</html>
casper.start()
casper.open('http://localhost:8080/index.html')
casper.then ->
@test.assert true
casper.run ->
@test.done()
$ casperjs test test.coffee
Test file: test.coffee
Waiting on loadInProgress navigationRequested
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress navigationRequested
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress
Waiting on loadInProgress navigationRequested
Processing next step!
PASS Subject is strictly true
Waiting on loadInProgress navigationRequested
Waiting on loadInProgress navigationRequested
Waiting on loadInProgress navigationRequested
Waiting on loadInProgress navigationRequested
Waiting on loadInProgress navigationRequested
Waiting on loadInProgress navigationRequested
Waiting on navigationRequested
Waiting on loadInProgress
Processing next step!
PASS 1 tests executed in 2.639s, 1 passed, 0 failed.
@EndangeredMassa
Copy link
Author

Run with casperjs test test.coffee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment