1

I'm absolutely new to CasperJS and I'm wondering what's the difference between those 'two modes'.

Both access the DOM, it seems that test mode has a limited access and functionality.

I looked for this question around and didn't find the answer.

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
Joako-stackoverflow
  • 506
  • 1
  • 6
  • 16

1 Answers1

1

In test mode you have access to the tester module and with it access to asserts, test suites and (xml) reports. This is not accessible in plain mode anymore (earlier versions than 1.1-beta4 had access to some of the test mode stuff in plain mode).

The only drawback to test mode is that you can only have one casper instance which is injected. This leads to:

  • When you try to create it, you will get an error.
  • (Nearly) all options have to be assigned directly and cannot be passed to create as an object.
  • Some things cannot be done like this one: A: How to open a new tab in CasperJS
Community
  • 1
  • 1
Artjom B.
  • 61,146
  • 24
  • 125
  • 222