0

I've a scenario where I need to search. The problem is that I need BackstopJS to wait until an animated gif is done, and after that take screenpicture. I've tried this:

  {
  "label": "My_search",
  "cookiePath": "backstop_data/engine_scripts/cookies.json",
  "url": "https://my.test.com/test/#/search",
  "referenceUrl": "https://my.stage.test.com/test/#/search",
  "clickSelector": "#page-wrap > search > div > ul > li:nth-child(2) > a > span",
  "delay": 15000
} 

Any idea how to solve this problem?

user3624378
  • 417
  • 4
  • 22

1 Answers1

1

you can add the load eventListener to your page and then log a readyEvent String for BackstopJS

window.addEventListener('load', () => {
  console.log('pageLoaded');
});

in your backstop scenario use "readyEvent": "pageLoaded",

manoi
  • 758
  • 4
  • 11