The API looks nice and clean, but I'm puzzled by this from the FAQ: > Puppeteer works only with Chrome. However, many teams only run unit tests with a single browser (e.g. PhantomJS). Is this true? Do teams write unit tests but only test them in a single browser? With test runners like Karma and Testem, running tests concurrently in multiple browsers is easy. You'd be throwing away huge value if for some reason you o…
From my experience most teams only test against a single browser, yes. It's however nice to have the option to switch to another browser when debugging a browser-specific bug. From what I've seen in practice, for a lot of teams and projects, running tests concurrently across multiple browsers isn't easy as you claim. Once you have a database involved and not a perfectly clean setup, concurrent testing can become a ha…
Puppeteer: Headless Chrome Node API
31–40 of 105 posts
Re: Puppeteer: Headless Chrome Node API
#32Would be nice if it was possible to change the proxy settings for each request or for each session. Last time I checked it was only possible with the C API.
Outside of that, Chrome doesn't currently support changing a network proxy dynamically, let alone for individual (and overlapping) requests.
Re: Puppeteer: Headless Chrome Node API
#33The project itself looks exciting.
Re: Puppeteer: Headless Chrome Node API
#34Re: Puppeteer: Headless Chrome Node API
#35Is there an equivalent of this for C#? I use Selenium a lot and find it annoying. Be interested to see if this is much better.
A C# binding was added just recently: https://github.com/BaristaLabs/chrome-dev-tools
Re: Puppeteer: Headless Chrome Node API
#36Earlier quoted context omitted.
We're fans of LucianoGanga's project (and of Chromeless, Doffy, Chrominator, Chromy, Navalia). I can tell you from personal experience that dealing with the raw DevTools Protocol isn't ideal for a developer writing an automation script, so it's clear there's demand for libraries with this higher-level API. Would love to know if there's a feature parity concern you have or what you'd like to see from puppeteer (or any…
Chromeless allows for the setting of cookies. I noticed in an issue for Puppeteer that it wasn't seen as a high priority. Our use-case (session based cookies) rely on a cookie being set in order for our PDF screenshots to work. Any chance you could give us some insight on when this may be available?
Re: Puppeteer: Headless Chrome Node API
#37Sadly, there's probably no money on the line. But you will get your buggy software used by huge corporations for years to come!
Re: Puppeteer: Headless Chrome Node API
#38Is there an equivalent of this for C#? I use Selenium a lot and find it annoying. Be interested to see if this is much better.
Re: Puppeteer: Headless Chrome Node API
#39Has anyone found something similar but for Python? The few I found all seemed to be abandoned or too limited in capability.
Re: Puppeteer: Headless Chrome Node API
#40So first there was Selenium's JSON Wire protocol, then came the W3C WebDriver spec and now we're back to browser-specific implementations? As someone who's tried/is trying to automate Firefox/Chrome/Safari/IE in a consistent fashion, my only question is: WHY?
Due to the nature of browser plugins, they could only access information that the browser made available. Also, the dev's have consistently been of the opinion that they only care to simulate an end-user experience. (End user's only care about the webpage's presentation, not which headers were present per transaction.) Although, I suspect that early restrictions influenced that viewpoint.
It wasn't until much later that browsers started implementing their own automation channels; Chrome's Automation Extension and Debugging Protocol, Firefox's Marionette, etc. At the same time, browsers started putting additional security measures around plugins making it even more difficult to have consistent features across Selenium's drivers.
Which is why the WebDriver became an open specification instead various driver implementations. I believe, Microsoft was the first to implement their own driver, InternetExplorerDriver, for IE7+. Then ChromeDriver (powered by Chrome Automation Extension), GeckoDriver (Firefox translation to their Marionette driver), and SafariDriver is now baked into Safari 10.
Marionette is possibly the most interesting, but I lack experience with it. TMK it allows for automating the entire browser; both the webpage and the 'chrome' interface. Whereas Selenium, at best, could only simulate actions - like the back button - through Javascript. But, even with the Marionette's feature richness, you still don't get access to request and response information.
I think for most developers ("devs", "qa", "scrapers", etc.) there's very little appeal in moving away from Selenium because it would require maintaining multiple test suites. It gives consistent results and just works. If you want lower level information, it's fairly simple to either 1) just use a CLI client (curl, wget, etc.), or 2) a library libcurl, Requests(Python), Net::HTTP(Ruby), etc. etc. etc., or 3) setup proxy server. I do all of the above, each has it's own downsides clients and libs don't do any rendering themselves and proxies tend to rewrite transactions (ex. strip compression and add/remove/alter headers 'Content-Type: gzip').