garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.68k stars 604 forks source link

Changing CasperJS default timeout #417

Open AkA84 opened 7 years ago

AkA84 commented 7 years ago

Is it possible to change the default CasperJS timeout using the "casperFlags" property?

I tried a couple of iterations:

"casperFlags": [
  "--waitTimeout=20000"
],
"casperFlags": [
  "--wait-timeout=20000"
]

but neither worked, I still get randomly

CasperJS:  Wait timeout of 5000ms expired, exiting.

on some test. Is it something that is at all possible to do?

kalebhermes commented 7 years ago

@AkA84 I'm not sure if it can be done in the casperFlags, but you can add the following line to the top of your casperjs files, and it will extend the default timeout.

casper.options.waitTimeout = 10000;