174 questions
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 ...
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:
[{},{},{},{},{},{},{},{},{}...
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 ...
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'...
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/...
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-...
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 ...
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.
...
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: '...
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 = '...
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 ...
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');
...
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 ...
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 ...
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 = ...