Questions tagged [selenium-chromedriver]

Developed in collaboration with the Chromium team, ChromeDriver is a standalone server which implements WebDriver's wire protocol.

ChromeDriver is a standalone server which implements WebDriver's wire protocol.

The ChromeDriver consists of three separate pieces. There is the browser itself ("chrome"), the language bindings provided by the Selenium project ("the driver") and an executable downloaded from the Chromium project which acts as a bridge between "chrome" and the "driver". This executable is called "chromedriver".

ChromeDriver is available for Chrome on Android and Chrome on Desktop (Mac, Linux, Windows, and ChromeOS).

The ChromeDriver consists of three separate pieces. There is the browser itself ("chrome"), the language bindings provided by the Selenium project ("the driver") and an executable downloaded from the Chromium project which acts as a bridge between "chrome" and the "driver". This executable is called "chromedriver".

You can find the documentation for chromedrive here.

The latest version of chromedriver can be download from Google ChromeDriver's page.

You can find the necessary documentation for using chromedriver with Selenium on Selenium Wiki.

14388 questions
26
votes
3 answers

How do I install ChromeDriver on Windows 10 and run Selenium tests with Chrome?

We have an Ubuntu server which we use for running Selenium tests with Chrome and Firefox (I installed ChromeDriver) and I also want to run the tests locally on my Windows 10 computer. I want to keep the Python code the same for both computers. But I…
Uri
  • 2,992
  • 8
  • 43
  • 86
26
votes
2 answers

Chromedriver on Ubuntu 12.04 - Error while loading shared libraries: libXi.so.6

I downloaded the 32-bit chromedriver version on my Ubuntu 12.04 machine. However, it won't run and exits with the following message. I have searched various places on the internet but failed to find a solution. ./chromedriver: error while loading…
KJW
  • 15,035
  • 47
  • 137
  • 243
25
votes
7 answers

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. chrome_options =…
25
votes
5 answers

how to save opened page as pdf in Selenium (Python)

Have tried all the solutions I could find on the Internet to be able to print a page that is open in Selenium in Python. However, while the print pop-up shows up, after a second or two it goes away, with no PDF saved. Here is the code being tried.…
25
votes
4 answers

How to find element using type in Selenium and Python

I have the below html code.


I am trying to find the two elements "file" and "submit" using Selenium with Python. Below is the…
25
votes
1 answer

WebDriver remove element from page

I'm using Selenium WebDriver(ChromeDriver). I need to remove some elements from page after processing(from DOM model). For example I have a following element: WebElement starRatingElement =…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
25
votes
2 answers

Does Chrome use XPath 2.0?

I was under impression that all latest browsers are with XPath 2 now. When I use lower-case() and uppser-case() (functions introduced in version 2) Chrome throws a syntax error. However, their older alternative translate() works fine. Is this a bug…
Ian Bytchek
  • 8,804
  • 6
  • 46
  • 72
24
votes
1 answer

How to get user agent information in Selenium WebDriver with Python

I am trying to get the actual user agent that I am using in Selenium, at the moment with the chromedriver. I found a Java version of this problem: How to get userAgent information in Selenium Web driver. Does someone know how to do that in Python?
24
votes
7 answers

Python/Selenium - Clear the cache and cookies in my chrome webdriver?

I'm trying to clear the cache and cookies in my chrome browser (webdriver from selenium) but I can't find any solutions for specifically the chrome driver. How do I clear the cache and cookies in Python? Thanks!
24
votes
2 answers

How to make Selenium not wait till full page load, which has a slow script?

Selenium driver.get (url) wait till full page load. But a scraping page try to load some dead JS script. So my Python script wait for it and doesn't works few minutes. This problem can be on every pages of a site. from selenium import…
bl79
  • 1,291
  • 1
  • 15
  • 23
24
votes
2 answers

TypeError: 'WebElement' object is not iterable error

I am trying to extract all the links from wikipedia homepage but this code showing TypeError: 'WebElement' object is not iterable error. import time from selenium import webdriver from selenium.webdriver.common.keys import…
priyanshu goyal
  • 289
  • 1
  • 2
  • 8
24
votes
3 answers

Hide/Silence ChromeDriver window

When I launch Selenium's WebDriver (Chromedriver). A console window (chromedriver.exe) runs and it opens Chrome. I need to know how I can hide those like a silent mode because I get messy when there are too many open. I am using C#.
user3240928
  • 525
  • 2
  • 4
  • 16
23
votes
5 answers

InvalidArgumentException: Message: invalid argument: user data directory is already in use error using --user-data-dir to start Chrome using Selenium

When I am trying to use --user-data-dir for the current user to start Chrome using Selenium I am getting an error as: File "C:\Program Files (x86)\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute …
23
votes
4 answers

How to set window size in Selenium Chrome Python

The following code to resize a selenium chrome window does not work: driver.set_window_size(1920, 1080) time.sleep(5) size = driver.get_window_size() print("Window size: width = {}px, height = {}px.".format(size["width"], size["height"])) From…
23
votes
12 answers

How to use Chrome Profile in Selenium Webdriver Python 3

So whenever I try to use my Chrome settings (the settings I use in the default browser) by adding options = webdriver.ChromeOptions() options.add_argument("user-data-dir=C:\Users\... (my webdriver path)") driver =…