Re:Polly.js – Record, replay, and stub HTTP interactions
by ikeboy on Wednesday June 13, 2018 @10:51PM
(#17308882)
The example is form filling though:
This is exactly like selenium code I've written to login. I struggle to see the difference in purpose.
[ Parent
| on HN ]
Re:Polly.js – Record, replay, and stub HTTP interactions
by stephen on Wednesday June 13, 2018 @11:43PM
(#17309113)
In your selenium code, the browser was talking to a database.
But sometimes that database is down, or really slow.
Polly says "browser, don't talk to the database anymore, instead here's what the database said last time".
So, yes, both Selenium and Polly poke DOM elements, but Selenium stops there, where as Polly does that + as well as tricks the browser into going through the whole test without making a real call to the database (assuming it has a previous recording of "what the database said" for that test).