Skip to main content
7 votes
1 answer
17k views

selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH error with Headless Chrome

when i run my script , i got this error Traceback (most recent call last): File "C:\Users\ishaq\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\common\service.py", line ...
Ishaq Ashraf's user avatar
42 votes
4 answers
55k views

Puppeteer page.evaluate querySelectorAll return empty objects

I am trying out Puppeteer. This is a sample code that you can run on: https://try-puppeteer.appspot.com/ The problem is this code is returning an array of empty objects: [{},{},{},{},{},{},{},{},{}...
agent3bood's user avatar
  • 1,354
141 votes
20 answers
330k views

How to configure ChromeDriver to initiate Chrome browser in Headless mode through Selenium?

I'm working on a python script to web-scrape and have gone down the path of using Chromedriver as one of the packages. I would like this to operate in the background without any pop-up windows. I'm ...
Maz's user avatar
  • 1,699
88 votes
12 answers
101k views

Downloading with chrome headless and selenium

I'm using python-selenium and Chrome 59 and trying to automate a simple download sequence. When I launch the browser normally, the download works, but when I do so in headless mode, the download doesn'...
TheChetan's user avatar
  • 4,578
140 votes
15 answers
298k views

Puppeteer wait until page is completely loaded

I am working on creating PDF from web page. The application on which I am working is single page application. I tried many options and suggestion on https://github.com/GoogleChrome/puppeteer/issues/...
n.sharvarish's user avatar
  • 1,663
26 votes
2 answers
53k views

Limit chrome headless CPU and memory usage

I am using selenium to run chrome headless with the following command: system "LC_ALL=C google-chrome --headless --enable-logging --hide-scrollbars --remote-debugging-port=#{debug_port} --remote-...
Ahmad Hijazi's user avatar
138 votes
11 answers
334k views

How to run headless Chrome with Selenium in Python?

I'm trying some stuff out with selenium, and I really want my script to run quickly. I thought that running my script with headless Chrome would make it faster. First, is that assumption correct, or ...
Rhynden's user avatar
  • 1,487
27 votes
7 answers
42k views

Download file through Google Chrome in headless mode

I'm do me code in Cromedrive in 'normal' mode and works fine. When I change to headless mode it don't download the file. I already try the code I found alround internet, but didn't work. ...
CBury's user avatar
  • 441
28 votes
5 answers
33k views

Crawling multiple URLs in a loop using Puppeteer

I have an array of URLs to scrape data from: urls = ['url','url','url'...] This is what I'm doing: urls.map(async (url)=>{ await page.goto(url); await page.waitForNavigation({ waitUntil: '...
ahhmarr's user avatar
  • 2,310
4 votes
2 answers
9k views

Access Denied page with headless Chrome on Linux while headed Chrome works on windows using Selenium through Python

I have this code that I'm using on my local machine: from selenium import webdriver chrom_path = r"C:\Users\user\sof\chromedriver_win32\chromedriver.exe" driver = webdriver.Chrome(chrom_path) link = '...
user avatar
5 votes
5 answers
12k views

Selenium Unable to locate element only when using headless chrome (Python)

I just started learning Selenium and need to verify a login web-page using a jenkins machine in the cloud, which doesn't have a GUI. I managed to run the script successfully on my system which has a ...
Ramesh Menon's user avatar
75 votes
9 answers
132k views

Puppeteer - Protocol error (Page.navigate): Target closed

As you can see with the sample code below, I'm using Puppeteer with a cluster of workers in Node to run multiple requests of websites screenshots by a given URL: const cluster = require('cluster'); ...
LioRz's user avatar
  • 1,025
72 votes
10 answers
63k views

Is it possible to run Google Chrome in headless mode with extensions?

I cannot use my currently installed extensions in Google Chrome using headless mode. Is there any way to enable them? An easy way to check if the extensions work is by adding, for example, the "Comic ...
pau.moreno's user avatar
  • 4,635
6 votes
2 answers
23k views

ERROR:gpu_process_transport_factory.cc(1007)-Lost UI shared context : while initializing Chrome browser through ChromeDriver in Headless mode

I am getting this error when I attempt to run code on 2 of 3 computers: [0502/155335.565:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. Here is the code: from selenium import ...
user3259863's user avatar
8 votes
1 answer
8k views

How to set selenium webdriver from headless mode to normal mode within the same session?

Is it possible after setting selenium webdriver to a headless mode set it back to a normal mode? from selenium import webdriver from selenium.webdriver.firefox.options import Options options = ...
Mykola Zotko's user avatar
  • 17.6k

15 30 50 per page
1
2 3 4 5
12