[Enhancement] - Chromeless Helper
What are you hoping to achieve?
Chromelss is an api wrapper for chrome in headless mode. It seems to have been inspired by NightmareJS, the key difference being that this runs in chrome so more representative of real life results.
The key selling point of chromeless as far as I can tell is as follows (taken from the chromeless github page):
[...] and runs in a serverless function in AWS Lambda. The advantage of this is that you can run hundreds of browsers in parallel, without having to think about parallelisation. Running integration Tests for example is much faster.
Suggestion
Create a codeceptjs Helper that wraps chromeless and it's AWS Lambda functionality to provide testing at scale.
Benefits
This wouldn't be a replacement for proper performance testing, but it would be a great way to potentially generate some load and concurrency for test scenarios that demanded it.
Considerations
I'm not sure if this would be impacted by #561 at all, or has any relationship really, but it's worth considering.
@DavertMik I might take this on if I find some time over the next few weeks if you think it's worthwhile?
Yes, Chromless would be really nice to have. And I think it could be implemented with no big effort as they have the same API as NightmareJS. Basically you can just try to copy the NightmareJS helper and make it work with Chromeless. If you have some time for it - it would be really great to have it implemented.
I will help with documentation and tests.
Cool, I'll get started on my fork this evening if I get a chance. I'll probably use the Nightmare stuff as a base and go from there 😄
Yes, use Nightmare. To be honest, the code there is a bit complicated (and I'm not so proud about that) but it works. What you need to understand that there are server and client part. Clientside part is the script injected to a page. It emulates locating elements (with it we support locating elements by XPath), clicking, and so on. The script is inside lib/helper/clientscripts.
I hope that may help. Anyway, please ask If you get questions.
@HughZurname any progress on this yet? Even if it's not ready, could you maybe start a PR to make the development progress more visible? :)
@jadbox I've not had a chance to do much yet, work has been pretty full on.
No updates? :(
@DavertMik Not yet unfortunately, it's unlikely I'll be able to do much until the new year. If anybody else would like to take it on though, feel free to do so :)
I took some time to investigate and looks like we won't support Chromeless as it has very limited API. For instance, there is no flexible wait method so it can't be used for our API. Instead we will focus on supporting Puppeteer #692