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

Selenium Headless vs Non Headless

I am currently working on a webscraping project using Selenium in python. My code works as intended when run from a web driver in non-headless mode. However, it is not the case when it is run in headless mode. For instance, if I try to extract text…
4
votes
1 answer

Failed to launch chromium headless using puppeteer on Ubuntu 16.04 AWS EC2 Instance

I have a microservice in which one of the API is generating PDFs (3 pdfs based on type passed as a parameter). I have used puppeteer package to generate the PDF. Works as charm on my local system. When I try to run the same microservice on EC2…
4
votes
3 answers

Public LinkedIn page requires authentication in Puppeteer but it doesn't when manually pasting the url in Chromium/Chrome

I am trying to open a public company page on Linkedin using Puppeteer, but every time it is redirected to an authentication form. This does not happen when I manually paste the URL in Chromium or in Chrome. This is the code: const puppeteer =…
revy
  • 3,945
  • 7
  • 40
  • 85
4
votes
2 answers

Get complete web page source html with puppeteer - but some part always missing

I am trying to scrape specific string on webpage below : https://www.booking.com/hotel/nl/scandic-sanadome-nijmegen.en-gb.html?checkin=2020-09-19;checkout=2020-09-20;i_am_from=nl; The info I want to get from this web page source is the number serial…
Jia
  • 2,417
  • 1
  • 15
  • 25
4
votes
1 answer

Correct way to get response body of XHR requests generated by a page with RStudio Chromote

I'd like to use Chromote to gather the response body of the XHR calls made by a website, but I find the API a bit complex to master, especially the async pipeline. I guess I need to first enable the Network functionality and then load the page (this…
Bakaburg
  • 3,165
  • 4
  • 32
  • 64
4
votes
2 answers

No node found for selector in headless true mode of puppeteer

My enviroment: Puppeteer version: 1.20.0 Platform / OS version: Ubuntu 18.04.3 LTS Node.js version: 8.10.0 Chrome/78.0.3882.0 This error content was printed in terminal: (node:18157) UnhandledPromiseRejectionWarning: Error: No node found for…
4
votes
4 answers

Unable to download a file when chromedriver is in headless mode. How to get it work?

During the test, a file (.html) will be downloaded from the web application & I have to verify that file by opening it on the browser. In the non-headless mode, my test is working fine. But whenever I'm going to headless mode, that file is not…
4
votes
1 answer

End to end test of electron app on Windows

What I am trying to achieve: I'd like to set up an electron project with a proper headless end-to-end testing configuration. Issues encountered Spectronjs seems to be the solution to achieve so. However there is no configuration to prevent the…
joeyj
  • 535
  • 1
  • 6
  • 22
4
votes
1 answer

Python 3 Selenium | Clipboard not working on headless chromedriver on Windows

In StackOverflow, there is already a similar post about this topic. Though the OP of the post answered stating that "this is a bug in Windows" and that "I did not find a solution, I just cut part of my code out". I have a slightly different…
Programer Beginner
  • 1,377
  • 6
  • 21
  • 47
4
votes
3 answers

Selenium Basic Authentication via URL HeadlessChrome ( On Linux Server)

In my Selenium Tests I need to test a webpage where I use a basic Authen, Knowing that I am using Chrome Headless Java and Selenium WebDriver. On my machine 'locally' It works perfectly using driver.get("https://admin:admin@localhost.."); and…
4
votes
2 answers

Selenide - How to run it with a headless Chrome?

We are trying to developer an automation test, and we found Selenide an interesting and easy framework for running the UI tests. Selenide needs as an input the browser to use. So we are passing 2 arguments to the…
riorio
  • 6,500
  • 7
  • 47
  • 100
4
votes
1 answer

Puppeteer - using '--allow-file-access-from-files' to load a local file through XMLHttpRequest is not working

I am trying to use a local file in Headless Chromium started through Puppeteer. I always run into the following error: 'Cross origin requests are only supported for protocol schemes: http, data, chrome, https' I did attempt to set…
4
votes
6 answers

Looking for a "headless browser" equivalent for PHP for Cucumber testing

I'm trying to set up some functional/acceptance/integration testing using Cucumber for my PHP project. I'm trying to understand the best approach to implementing these types of tests. I understand that Selenium can test javascript, but Selenium is…
Andrew
  • 227,796
  • 193
  • 515
  • 708
4
votes
2 answers

Get selector from puppeteer's ElementHandle

I'm currently working with Puppeteer. I noted that in Chrome dev tools I'm able to get a selector from any element (copy/Copy Selector) and I was wondering if it would be possible to obtain a full css selector from an ElementHandle in Puppeteer as…
angrykoala
  • 3,774
  • 6
  • 30
  • 55
4
votes
1 answer

Puppeteer & browserWSEndpoint: can't upload files dynamically

I'm trying puppeteer and browserless/chrome (https://hub.docker.com/r/browserless/chrome) to test some automation scripts. I'm currently just running a browserless/chrome instance locally, connecting puppeteer to it with browserWSEndpoint. It's all…