OnetapInc / chromy

Chromy is a library for operating headless chrome. 🍺🍺🍺
MIT License
606 stars 41 forks source link

Error: An error has occurred evaluating the script in the browser.ReferenceError: $ is not defined #87

Closed kiran-redhat closed 6 years ago

kiran-redhat commented 6 years ago

Getting following errors randomly when used more than one chrome instances , running them from BackstopJS. This is intermittent. Looks like chromy triggering script before browser fully loaded ?

  1. "Error: An error has occurred evaluating the script in the browser.ReferenceError: $ is not defined" (I use jQuery to show some elements) 2 WaitTimeoutError: wait() timeout
  2. Chromy error: error
dotneet commented 6 years ago

When .goto() is executed without options, chromy waits until load event is fired. If the script tag for loading jQuery has async or defer attribute, you need to wait manually for loading jQuery.