I used NightwatchJS on previous projects, but I'm tired of Selenium/Java dependency (and I don't really like the Nightwatch API). Now, I mostly use a library built by one of my coworkers: Wapiti.
It's based on Puppeteer, have a clean API and that do the job.
I'm a fan of Open Source and have a growing interest in serverless and edge computing. I'm not a big fan of spiders, but they're doing good work eating bugs. I also stream on Twitch.
So, so far you're team has been enjoying Puppeteer? I imagine your co-worker wrote Wapiti to wrap some repetitive code your team was writing with Puppeteer?
There are still some pain points with Puppeteer (inside Docker is not optimal and I can't install it on windows for a friend) but it is sooo much better than selenium.
To be honest, my main focus writing Wapiti was to deal with VCR in tests. Puppeteer is great for running things and I added a mode to change fetch to be able to save API calls and to redo them in a CI environment (we had the problem with a frontend and an API in separate projects, testing in CI by cloning the other project and launching it was not really usable).
After that, I added a feature that I personally like: the possibility of "capturing" several value inside one test which I show in the first example in the doc:
test("it should get the content of elements of the page",()=>{returnWapiti.goto("http://localhost:3000/index.html").capture(()=>document.querySelector("h1").textContent).capture(()=>document.querySelector("h2").textContent).run().then(result=>{expect(result).toEqual(["content of h1","content of h2"]);});});
Using capture only one will produce a single-value result but using it several times will produce an array of value.
As EtE tests are quite expensive, I wanted to be able to test several things at the same time on a page.
As a bonus, Arnaud made me add a way of dealing with tabs '
And the future goal is to be able to start a local server while running tests to embark everything needed to test a pure frontend project.
I'm a fan of Open Source and have a growing interest in serverless and edge computing. I'm not a big fan of spiders, but they're doing good work eating bugs. I also stream on Twitch.
I used NightwatchJS on previous projects, but I'm tired of Selenium/Java dependency (and I don't really like the Nightwatch API). Now, I mostly use a library built by one of my coworkers: Wapiti.
It's based on Puppeteer, have a clean API and that do the job.
What else? ;-)
fenntasy.github.io/Wapiti/
github.com/Fenntasy/Wapiti
Thanks for posting Arnaud, A+.
So, so far you're team has been enjoying Puppeteer? I imagine your co-worker wrote Wapiti to wrap some repetitive code your team was writing with Puppeteer?
Author here :)
There are still some pain points with Puppeteer (inside Docker is not optimal and I can't install it on windows for a friend) but it is sooo much better than selenium.
To be honest, my main focus writing Wapiti was to deal with VCR in tests. Puppeteer is great for running things and I added a mode to change fetch to be able to save API calls and to redo them in a CI environment (we had the problem with a frontend and an API in separate projects, testing in CI by cloning the other project and launching it was not really usable).
After that, I added a feature that I personally like: the possibility of "capturing" several value inside one test which I show in the first example in the doc:
Using
capture
only one will produce a single-value result but using it several times will produce an array of value.As EtE tests are quite expensive, I wanted to be able to test several things at the same time on a page.
As a bonus, Arnaud made me add a way of dealing with tabs '
And the future goal is to be able to start a local server while running tests to embark everything needed to test a pure frontend project.
You should write a post on why you created Wapiti if you haven't already. 😉
It's in my todo 🙂
But in the meantime, I wrote a longer explanation here fenntasy.github.io/Wapiti/docs/why...