jdobosz / testcafe-browser-provider-puppeteer Goto Github PK
View Code? Open in Web Editor NEWThis is the puppeteer browser provider plugin for testcafe
License: MIT License
This is the puppeteer browser provider plugin for testcafe
License: MIT License
In the closeBrowser
method only the opened page gets closed. The browser process remains open and can prevent process termination in case of tests started through TestCafe API (e.g. gulp-testcafe
). Puppeteer's browser.close()
method should be called in the closeBrowser
method to prevent this behavior.
node version 8.10
testcafe version 0.20
##Here is my issue
I have been using this package to run testcafe on a Jenkins server. It was working nicely but the Jenkins has been restructured. Now agents are generate via docker and these agents can't download chromium but do come with puppeteer and chromium pre-installed.
What I'd like to do is use this package but provide it an existing puppeteer or chromium as opposed to it downloading a new puppeteer every time we wish ti use it.
Version 1.3.2 of this has a dependency on 1.4.0 of Puppeteer. It worked just fine when I installed it a little over a week ago using 1.4 of Puppeteer. However new installs seem to be pulling 1.5.0 puppeteer which doesn't seem to work.
When running my tests I get:
14:36:56 ERROR: The process "9700" not found.
14:36:56 ERROR Was unable to open the browser "puppeteer:" due to error.
14:36:56
14:36:56 Error: Failed to launch chrome!
14:36:56 [0613/143656.027:ERROR:main_dll_loader_win.cc(134)] Failed to load Chrome DLL from \node_modules\puppeteer.local-chromium\win64-564778\chrome-win32\chrome.dll: The specified module could not be found. (0x7E)
use runner
.browsers(['puppeteer:no_sandbox'])
error: { Error: Was unable to open the browser "puppeteer:no_sandbox" due to error.
Error: WebSocket is not open: readyState 3 (CLOSED)
Hello!
My tests fails in headless chrome due to smaller window size than I have in regular chrome.
Is there any way to configure default window size?
Thanks
Hey folks! I’m the maintainer if Browserless (a docker/hosted service for puppeteer). I’d love to contribute to this repo instead of building it myself, and to that end I’m looking to add a remote connections as part of this plugin.
My first idea is to allow a remote URL in your provider string, similar to how you allow the path of the binary executable. Would just be a condition to check if that part of the string is a path or fully-qualified URL. Can do a quick PR if that helps!
I'm trying to take screenshot of full page using takeScreenshot
function with property fullPage: true
(doc).
Unfortunately when I'm using puppeteer (with testcafe-browser-provider-puppeteer
) it doesn't work. Screenshots still contain only visible in viewport part of page.
I prepared repository, where you can reproduce my scenario. Repository contains simple test with custom browser provider - testcafe-browser-provider-puppeteer.
Steps:
git clone [email protected]:pfryga/testcafe-issue-poc.git
npm ci
npm run visual-regression
/Users/[...]/testcafe-issue-poc/screenshots/default/normal.png
screenshot. For next 10 seconds created screenshot contains full page (proper behavior).10000 ms
- for this time correct screenshot is created by puppeteer.10000 ms
Testcafe replaces created screenshot with corrupted one (non full page) - undesirable stepThis issue has been reported before in Testcafe repository. Their research showed that the issue can be in the hasCustomActionForBrowser function, which is not overridden in the provider.
I have tried to override hasCustomActionForBrowser function in my fork of testcafe-browser-provider-puppeteer
but it does not solve the problem.
What should I set in the provider to eliminate replacing a valid screenshot with a corrupted one?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.