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
7
votes
1 answer

Chrome headless: exit on timeout

I'm using chrome headless to take screenshots. But when adding a timeout, the process does not exit, it stays alive... Is there a way to kill the process on errors (like timeouts)? Command without timeout and its output (this one is working): >>>…
Nicolas
  • 1,812
  • 3
  • 19
  • 43
7
votes
2 answers

Open chrome with default user profile using python and selenium on mac

I am trying to get Selenium to open Chrome just as if I was opening it myself, i.e. I should be logged into my accounts like Facebook. I have the following code: def startChrome(): options = webdriver.ChromeOptions() …
7
votes
2 answers

Timeout Error occurred When run a script on Headless chrome browser by using Selenium Webdriver with Python

When I am running python scripts to test a website on Headless Chrome Broswer (Webdriver + Selenium), we often get a timeout error, I found out the problem occurred when script interacted with browser by .click() or .send_keys() methods. Can anyone…
7
votes
1 answer

Headless chrome proxy server settings

Could anyone help me with setting proxy-server for headless chrome while using the lighthouse chrome launcher in Node.js as mentioned here const launcher = new ChromeLauncher({ port: 9222, autoSelectChrome: true, // False to manually select…
7
votes
2 answers

Getting GDK_BACKEND does not match available displays error in debian

Actually i am trying to run a headless browser in remote debian server through selenium. I have firefox 46.0.1 installed in the server and i am using selenium 2.53.1 version. Whenever i tried to run a given test i got the following error.…
tempEngineer
  • 223
  • 1
  • 3
  • 13
7
votes
2 answers

Headless browser testing with download functionality?

I've been looking for a solution to do headless testing in osx. But I need the ability to save files returned by the server. I've tested selenium, phantomjs, casperjs and have looked into anything I could find online. none of them supports…
Mars
  • 4,197
  • 11
  • 39
  • 63
7
votes
2 answers

Injecting javascript into zombie.js

Hi I was wondering if there is the ability in node js and zombie js to inject javascript files in to the headless browser, similar to what you can do with phantomjs. For example in phantom js you would do: page.injectJs("amino/TVI.js") I have used…
Charabon
  • 737
  • 2
  • 11
  • 23
7
votes
1 answer

Selenium Pyvirtualdisplay Hangs on starting

I have a selenium test which I am trying to run Headlessly on my ubuntu server. It uses pyvirtualdisplay and xephyr. Though the script is running fine in my local system, it hangs when I run it in the server. I have tried to clear memory and…
Saheb
  • 1,666
  • 3
  • 18
  • 24
7
votes
2 answers

Testing a WebRTC application

I'm trying to test a WebRTC application. Right now the best I can do is to open several private browser windows and let them talk to each other, but this clearly doesn't scale. I'm looking for a way to create a large number of peers on a single…
Derek Chiang
  • 3,330
  • 6
  • 27
  • 34
7
votes
2 answers

Python Headless Browser for GAE

I'm trying to use Angular.js client-side with webapp2 on Google Appengine. In order to solve the SEO issues the idea was to use a headless browser to run the javascript server-side and serve the resulting html to the crawlers. Is there any headless…
lnaia
  • 434
  • 1
  • 4
  • 12
6
votes
1 answer

Prevent Chrome-Headless from enforncing ssl

Setup I'm running chrome-headless as a container in my docker-compose project. My main app (the one I'd like to test) is named 'app' inside the compose file. To connect from the chrome-headless container to my app, I'm using the dockers internal…
Seltsam
  • 854
  • 1
  • 7
  • 27
6
votes
2 answers

How to perform right click with Puppeteer?

I'm trying to perform right-click with Puppeteer. I've tried to add the option: await component.click({ button: "right" }) But all I get is a regular click on the component. I followed Puppeteer's API. What am I doing wrong?
6
votes
1 answer

Headless Chrome - trigger callback from loaded webpage

Is there a way to trigger a callback from the loaded webpage? I used to use PhantomJS where it was possible using following code: if (typeof window.callPhantom === 'function') { window.callPhantom({ data: 'RenderPDF' }); } And in the…
6
votes
1 answer

New Headless Chrome in Geb

I'm trying to get my project that uses Geb to run the beta channel of Chrome in headless mode. I can reproduce the issue using the Geb Gradle example project. In GebConfig.groovy, I've got this block to define chrome: environments { // run via…
jonnybot
  • 2,435
  • 1
  • 32
  • 56
6
votes
0 answers

Running phantomjs in Android environment

I have an architecture in place that is working OK... basically my Android app sends some options to a node.js server, those options are processed at the server and related data is fetched, and the fetched data is then processed at the server by…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181