OnetapInc / chromy

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

regression? with .wait(<selector>) #50

Closed garris closed 6 years ago

garris commented 6 years ago

Might be a regression here too?

After addressing #49 -- when testing with a script using wait() the script hangs.

You can see this with https://github.com/garris/backstop-feature-tests

Running the first scenario noSelectors hangs waiting for a selector -- testing noSelectors_readyEvent does work.

dotneet commented 6 years ago

Might be a regression. In chormy 0.4.5, I changed wait() behavior. I'll investigate this problem tomorrow. Please use chromy 0.4.4 until a reason is found.

dotneet commented 6 years ago

Please try to use 0.4.3.

garris commented 6 years ago

Yes. 0.4.3 works fine. Thanks for the response.

Perhaps you may need to add some acceptance tests to your release pipeline? You can feel free to use the tests here... https://github.com/garris/backstop-feature-tests This does not test ALL chromy features -- but it does cover a lot of chromy api surface area.

For the time being I will pin backstopjs to a specific version of chromy and bump as needed.

Cheers!

dotneet commented 6 years ago

I found out a problem. Chromy uses document.body.querySelector() in wait(selector), so can't find a body element. should have used document.querySelector().

I already have unit tests but this problem could not be found. I'll add some test cases and consider CI system.

dotneet commented 6 years ago

fixed. please try v0.4.6.

garris commented 6 years ago

Works!