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

Return to “Python”

Who is online

Users browsing this forum: rpdom and 13 guests