Posts: 2
Joined: Tue Sep 12, 2017 10:33 pm

Selenium WebDriver

Wed Sep 13, 2017 1:21 am

Too long, didn't read: I want Selenium to work on my Raspberry Pi with Java(Trying on Python atm though, because it's more popular here). However, none of the drivers seem to work.

First I tried using ChromeDriver, but I've read somewhere that it doesn't support ARM architecture. I was getting error:
/home/pi/Desktop/selenium/chomedriver: Syntax error: word unexpected (expecting ")")
Nothing seemed to work, so I gave up.

I tried using Firefox instead. Found some instructions for Python, so I wanted it to run with Python first and then I would try to make it work for Java. However, something is wrong as well. This is what I have done so far:
1. Used these commands:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install iceweasel
sudo apt-get install xvfb
sudo pip install selenium
sudo pip install PyVirtualDisplay
sudo pip install xvfbwrapper

2. Used this python script:
from pyvirtualdisplay import Display
from selenium import webdriver

display = Display(visible=0, size=(1024, 768))

driver = webdriver.Firefox()


3. I've downloaded geckodriver from here:
File: geckodriver-v0.18.0-arm7hf.tar.gz
Extracted it into /usr/local/bin/geckodriver

However, when running the code above I get this:
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/", line 194, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: Unable to find a matching set of capabilities

I googled it and found some answers about updating everything: Firefox, selenium, gecko

My versions are:
Python 2.7.9
Geckodriver 0.18.0
Firefox 45.9.0
Selenium - i don't know how to check it, but it should be fine when I just installed it, right?

Things seem to be up to date. Anything else you could suggest? I want Selenium to run so badly :(

Posts: 2
Joined: Tue Sep 12, 2017 10:33 pm

Re: Selenium WebDriver

Thu Sep 14, 2017 3:54 pm

Solved. Had to update firefox. However, I couldn't find a way of updating iceweasel to version 53.

If anyone has the same problem:
I used this site:
selected: I am running Debian oldstable(Jessie) and I want to install Firefox version esr52
And followed the instructions

Posts: 1
Joined: Tue Dec 26, 2017 12:04 am

Re: Selenium WebDriver

Tue Dec 26, 2017 12:10 am

I tried it with iceweasel and firefox-esr but I always get this error:

Code: Select all

Traceback (most recent call last):
  File "", line 9, in <module>
    browser = webdriver.Firefox()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/", line 158, in __init__
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/", line 154, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/", line 243, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/", line 311, in execute
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/", line 237, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
after running this python script

Code: Select all

from selenium import webdriver
from pyvirtualdisplay import Display

#create virtual display
display = Display(visible=0, size=(800, 600))

# make a firefox-instance
browser = webdriver.Firefox()

#open url

print (browser.title)

Does anybody has an idea how to solve it or what I could have wrong?

Posts: 2
Joined: Sat Oct 12, 2013 5:18 pm

Re: Selenium WebDriver

Tue Feb 27, 2018 12:48 am


I read your post and I am facing the same situation.

I have a program in python that uses selenium and beautifulsoup4 packages with chromedriver for webscrapping. I works great on my laptop under ubuntu.

I would like to have it on my Raspberry Pi, but can't get chromedriver running on Raspbian.

I read in some forums that chromedriver is not compatible with Raspberry Pi... I was going to try Firefox when I saw your post.

Did you get selenium working on a Raspbrry Pi? I would appreciate if you share some feedback and tips.


Return to “Python”

Who is online

Users browsing this forum: No registered users and 11 guests