Questions tagged [headless-browser]

A headless browser is a web browser without a graphical user interface. They are used to provide content of web pages to other programs.

A headless browser is a browser without a GUI. In most cases, it can be accessed from a command line.

They are typically used for automated testing of websites.

Examples include:

748 questions
9
votes
0 answers

CasperJS is too slow because of too many navigation requests

As we know we can abort a resource request in CasperJS, like this: casper.on('page.resource.requested', function(requestData, request) { if(/plusone|google\.com|about:blank/.test(requestData.url)){ this.echo("----I can ignore this------"); …
aaron
  • 1,951
  • 3
  • 27
  • 41
9
votes
3 answers

How to run browsers(chrome, IE and firefox) in headless mode?

I want to integrate JSTestDriver with jenkins-CI. problem is that the build server does not have display. is there a way to run browsers headlessly? Thanks
Mukesh Kumar
  • 783
  • 1
  • 9
  • 24
9
votes
2 answers

c# headless browser with javascript support for crawler

Could anyone suggest headless browser for .NET that supports cookies and authomatically javascript execution?
Bogdan Dudnik
  • 413
  • 2
  • 7
  • 19
9
votes
2 answers

How to make PhantomJS include background images when rendering screenshot?

I'm using PhantomJS to take screenshots of a webpage, with the page.render() method as detailed in https://github.com/ariya/phantomjs/wiki/Screen-Capture . It works fine except for background images, which all somtimes appear blank. You can see an…
Michael Low
  • 24,276
  • 16
  • 82
  • 119
8
votes
1 answer

Unable to invoke firefox headless

I would like to know why i'm getting the following error message and how can i fix it: Traceback (most recent call last): File "teste.py", line 30, in <\module> main() File "teste.py", line 24, in main driver =…
8
votes
1 answer

Chrome Headless Doesn't work

I've read about the Chrome Headless from developers.google said we can run the Google without UI. Quote from that link : Headless Chrome is shipping in Chrome 59. It's a way to run the Chrome browser in a headless environment. Essentially,…
Yohanim
  • 3,319
  • 9
  • 52
  • 92
8
votes
1 answer

Running electron (atom-shell) headlessly on linux server through Nightmare.js

I am building a scraper to make JS single page applications easily crawlable. After some incredible frustration with PhantomJS (memory leaks, outdated webkit, undead processes, among many other problems) I decided to switch to NightmareJS which can…
Rayjax
  • 7,494
  • 11
  • 56
  • 82
7
votes
1 answer

Setting up headless Firefox with MozRepl

I would like to run a crawler that can handle javascript created html in an environment without an X server. I know I can run Firefox in a headless state under xvfb, and I know how to install MozRepl on Firefox and interact with it using…
Vijay Boyapati
  • 7,632
  • 7
  • 31
  • 48
7
votes
2 answers

HeadlessChrome with Chrome 83 disconnected with Karma

I perform some unit-tests with Karma, Sinon and Mocha. It was working fine and for one month, I have some issues running these unit-tests. I have an error with HeadlessChrome. Indeed, it shows this error: HeadlessChrome 83.0.4103 (Windows 10.0.0)…
PierBJX
  • 2,093
  • 5
  • 19
  • 50
7
votes
1 answer

How to render a .mht file inside an iframe

I want to take a snapshot of a page using headless chrome which will return a file to me, so I am creating an mht file as it will contain more information about the web page. So, now I want to render this snapshot inside an iframe but I am unable to…
iamsaquib8
  • 414
  • 6
  • 15
7
votes
1 answer

How do we pass authentication token in headless chrome in google puppeteer?

I want to pass authentication token(JWT) in puppeteer headers, for the pdf view with headless chrome in my application? We are using react as our front-end UI. And using puppeteer we are able to generate pdf, but the link to pdf we need to…
uppu
  • 73
  • 1
  • 5
7
votes
2 answers

Making a POST request using puppeteer with JSON payload

I'm trying to make a POST request using puppeteer and send a JSON object in the request, however, I'm getting a timeout... if I'm trying to send a normal encoded form data that at least a get a reply from the server of invalid request... here is the…
naoru
  • 2,149
  • 5
  • 34
  • 58
7
votes
2 answers

Function similar to document.ready() in Puppeteer?

Is there something like document.ready() in Puppeteer? There is: page.waitForSelector(selector) Since there are so many same-name selector on any HTML page, how can this function can be sure that the right page has been loaded? It is a simple…
7
votes
1 answer

How to make puppeteer work through socks5 proxy?

I bought a proxy server version of socsk5. In all manuals the same example const browser = await puppeteer.launch({ headless: true, ignoreHTTPSErrors: true, defaultViewport: {...winSize}, args: [ …
7
votes
1 answer

Selenium with headless chrome fails to get url when switching tabs

I'm currently running Selenium with Specflow. One of my tests clicks on a button which triggers the download of a pdf file. That file is automatically opened in a new tab where the test then grabs the url and downloads the referenced file directly…