I can’t make python bindings for webdriver workable. Here is tutorial for installing.
easy_install webdriver
Won’t find webdriver package so I have to install it manually from sources. I’ve downloaded source from trunk, set WEBDRIVER and PYTHONPATH variables and installed webdriver:
~$ cd ~
~$ svn checkout http://selenium.googlecode.com/svn/trunk/ selenium-read-only
~$ cd selenium-read-only
~# python setup.py install
~$ env |grep PYT
~$> PYTHONPATH=:/home/ockonal/selenium-read-only/../../../firefox/lib-src:/home/ockonal/selenium-read-only/..
~$ env |grep WEB
~$> WEBDRIVER=/home/ockonal/selenium-read-only
Here is output of setup.py script.
Then I downloaded RemoteDriverServer.jar and ran it:
java -jar RemoteDriverServer.jar 8888
Now I want to include webdriver module in python script:
from selenium.firefox.webdriver import WebDriver
ImportError: No module named firefox.webdriver
Try this.
I’m guessing that selenium was installed to:
In either the site-packages or dist-packages folder.
Since the link to your setup.py output is broken I can’t see the results so I’m going to make some assumptions based on a ‘normal’ setup.py install
One of these folders should exist:
or
This is the folder where the python library should exist based on the setup.py how the packages are defined in setup.py.
Now go back to the folder where you downloaded the source and navigate to.
Copy the all of the source files to whichever one of these two files exist.
or
This is the equivalent to a ‘manual install’. Although I’m not sure why you’d need to because the firefox parts of the package are clearly specified in the setup.py source.
If there is nothing for selenium under the site-packages or dist-packages folders the ‘setup.py install’ may not have installed correctly because it didn’t have the required permissions.
Be sure to run ‘setup.py install’ with sudo if you haven’t already. Since, root permissions are necessary to modify/add anything under ‘/usr’.