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
4
votes
3 answers

Download files in Java, Selenium using ChromeDriver and headless mode

As it is still not clear for me how to download files using --headless mode in ChromeDriver - selenium [Java], add here please the example of how to do so, I try to do it like that (the file downloading works properly without --headless…
4
votes
0 answers

google chrome headless repl doen't work

I'm running this command chrome --headless --disable-gpu --enable-logging --repl https://www.chromestatus.com/ then I get a cmd filled with the error {"result":{"type":"undefined"}} my os is windows 8.1 chrome version 63.0.3239.84
4
votes
0 answers

Getting a "Timed out receiving message from renderer: -0.003" after switching to a new tab in headless Chrome with Selenium

I am trying to validate that a pdf contains a specific value, to do this , I click on a button that generates said pdf and opens it in a new tab. After this I switch to the new tab and then download the pdf and parse it. This all works if I am not…
4
votes
1 answer

how to detect selenium/webdriver browsing on my site

Does anyone know how to detect selenium/webdriver browsing on my site? I don't want to block them, just detect them. I saw this question: Can a website detect when you are using selenium with chromedriver? But trying all of these on latest version…
Eyal H
  • 991
  • 5
  • 22
4
votes
0 answers

Chrome Headless clipboard error

I'm using Chrome Headless for testing purpose. It is used in conjunction with nightwatch. There is an action that clicks on a button in a page. Unfortunatly the page is not online, but the copy part is done with export:…
4
votes
1 answer

Use headless chrome to intercept image request data

I have a use case that needs to use Headless Chrome Network (https://chromedevtools.github.io/devtools-protocol/tot/Network/) to intercept all images requests and find out the image size before saving it (basically discard small images such as…
HP.
  • 19,226
  • 53
  • 154
  • 253
4
votes
3 answers

How to enable print media emulation in headless Chrome?

Is there a way to enable simulated device mode or emulated print media mode in headless Chrome in Linux? It can be done manually in DevTools like so: The goal is to take a full-page screenshot in emulated print media mode without injecting or…
4
votes
0 answers

Chromium headless remove --no-sandbox notification

I am trying to run Chromium headless mode, with the following command: chromium --no-sandbox \ --kiosk \ --disable-extensions \ https://www.chromium.org How can I get rid of that notification bar in the top?
klodoma
  • 4,181
  • 1
  • 31
  • 42
4
votes
0 answers

Does chrome-headless support reuse browser session using selenium webdriver ?

I know of chrome having support for reusing browser session using selenium webdriver. Is it available for Headless Chrome as well ? If so, is there some difference with respect to chrome
4
votes
3 answers

How can I tell that the page has finished loading?

I'm playing with Chromium's headless web browser API. Based on chrome_remote_shell source code, I came up with the following code: #!/usr/bin/env python import json import requests import pprint import websocket tablist =…
d33tah
  • 10,999
  • 13
  • 68
  • 158
4
votes
1 answer

How to make the phantomjs browser visible?

I know that it is sound strange. The point is that I want a NodeJS app to control the browser. On the same time, I want to see the browser and be able to interact with it it, and see what it is doing in real-time. If it is not possible in PhantomJS,…
Aminadav Glickshtein
  • 23,232
  • 12
  • 77
  • 117
4
votes
1 answer

ElementNotVisibleException when running headless browser on Jenkins node. Test case runs successfully on local machine using chrome broswer

I am running Selenium headless browser on a Jenkins windows node as a part of test suite. However, it throws org.openqa.selenium.ElementNotVisibleException - element is not visible. On my local machine, I am able to run the same test suite…
TT_
  • 385
  • 1
  • 2
  • 14
4
votes
0 answers

phantomjs screenshots of JS heavy websites

I have used different variations and suggestions from almost a dozen of answers in SO, but nothing seems to help solve this problem I'm about to explain below. There are a few sites, in which phantomjs screenshots look bad, the content is loaded…
openrijal
  • 583
  • 6
  • 22
4
votes
1 answer

PhantomJS version compatibility with Selenium

I could not use Selenium WebDriver (a.k.a Selenium 2) 2.53.0 with PhantomJS 1.2.0. Is there any workaround? I had to use WebDriver 2.41.0 instead of latest version (2.53.0).
Mahbub Rahman
  • 1,295
  • 1
  • 24
  • 44
4
votes
2 answers

Android Headless Browsing through WebView?

I am trying to create an Android app for a Website, Which is not mine. But is a search engine for Restaurants. They have no API to work with. And i want to heedlessly browse their website and put the search query in the HTML Form and Click the…