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

Running Selenium in headless mode via Linux causes errors

I have a large set of tests running on a site. When I run the test locally on Windows - they all pass on 100%. The test are designed and running on Google Chrome. Now, we have started to run the tests on Linux via Jenkins jobs on headless mode. Some…
Tal Angel
  • 1,301
  • 3
  • 29
  • 63
3
votes
1 answer

How to wait until URL change / or until connection is offline

I'm using Playwright 1.12 + Chromium 90 for daily Router restarts. My script navigates to router's page 1.1.1.1/reset.asp Then script click's button, accept dialog, and magic is happening inside router. Now I have two options to have sure that…
Chamov
  • 159
  • 2
  • 9
3
votes
0 answers

Cypress + headless Electron: CoreText warning

I have recently migrated to macOS version Catalina, test running using Cypress version 7.4.0, and browser Electron v13.0.1 installed. If a headless test runner using browser Electron is started as follows in the command line, the tests do run…
Jeff
  • 1,917
  • 1
  • 25
  • 43
3
votes
1 answer

Puppeteer request interceptor causes net::ERR_FAILED errors with HTTP 30x redirections

I am trying to get HTML from an URL using Puppeteer without following redirection nor triggering related HTTP requests (CSS, images, etc.). According to Puppeteer documentation, we can use page.setRequestInterception() to ignore some requests. I…
CDuv
  • 2,098
  • 3
  • 22
  • 28
3
votes
1 answer

How to get the complete html AFTER javascript on RPi in a file

I have a RPi 4 and I want, via terminal, to generate a website.html that has the complete rendered html of a webpage. I want to do this for example in order to search the whole page for a string or pattern etc... I can do this using something like…
3
votes
0 answers

Python Selenium - Proxy with authentication on headless mode

I need to run proxies that requires authentication on selenium in headless mode. I think many people are aware of the answer given on this post and it does work very well honestly But only In NON Headless Mode. As extensions are no longer supported…
SunAwtCanvas
  • 1,261
  • 1
  • 13
  • 38
3
votes
0 answers

Pupeeteer heroku buildpack exiting the lunch statement on heroku

This is the error it gives me when I deploy to heroku It is says that I should check the file "localScrape.js" on line 11 column 21. I went and included a try/catch block to work my way around it but it is persistently giving me the same error…
3
votes
3 answers

How to detect if selenium initializer driver is headless

Let's say I have this code options =…
puppet
  • 707
  • 3
  • 16
  • 33
3
votes
2 answers

How do you run Selenium headless in PHP?

We'd like to run our Selenium tests along with our other unit tests in our build scripts, but given that the builds are running on Jenkins, which is running as a service, the tests need to be run headless. Our Selenium tests are written in PHP, and…
RobH
  • 1,607
  • 2
  • 24
  • 44
3
votes
1 answer

Using puppeteer or playwright, is there a way to update the args initially passed in the launch method?

I want to update the source of the file passed to the arg --use-file-for-fake-video-capture. Is there a way to update it after the browser instance has been initialized or will this require me to reinitialize the instance with the new source of the…
3
votes
1 answer

C# Selenium - headless browser

I develop a small app (in C#) which automatize a test on a website with Selenium. Everything is going well. But when I try the same app with "headless" browser the test doesn't work. I have an issue with the code below : var emailTextBox =…
Nounet
  • 63
  • 1
  • 6
3
votes
0 answers

Getting "org.openqa.selenium.TimeoutException" when waiting for an element to load using Selenium Java Test case

My Java Selenium Test case works fine when run using chrome driver, however the exact same code fails when run using HeadLess HTML driver. I got the below java code using Katalon Selenium IDE. import java.util.regex.Pattern; import…
Ashar
  • 2,942
  • 10
  • 58
  • 122
3
votes
1 answer

Problem with Chrome headless from CLI: empty PDF and error "Failed to serialize document: Uncaught"

My web application generates a PDF from an HTML page via Google Chrome 76.0.3809.100 headless on Debian GNU/Linux 9.9 (stretch). My call looks like this: google-chrome --headless --ignore-certificate-errors --hide-scrollbars…
3
votes
1 answer

Saving a page using a headless browser with Selenium and Python

I'm looking for a way to save a full web page with Selenium and Python, but using a headless browser. And I want the saved page to be completely identical to how the webpage appears when we open it (just like using the "Save as..." feature in the…
3
votes
1 answer

Why local chrome-urls like: chrome://downloads or chrome://apps doesn't work in headless mode?

I am trying to visit chrome local urls. But it's not working. Does headless chrome support local urls?