Re: py-selenium and OpenBSD

2014-06-20 Thread Eric Radman
On Thu, Jun 19, 2014 at 08:21:11PM -0700, Craig Paulette wrote:
> 
> I'm attempting to do some web development on OpenBSD but can't get
> py-selenium to work.  This thread shows that I'm not alone:
> http://openbsd.7691.n7.nabble.com/py-selenium-td238035.html
> 
> I can't be the only one trying to use py-selenium on OpenBSD.  What is
> everyone else doing as a workaround in the meantime?

What browser were you trying to use with py-selenium? I'd start by
running these sort of tests using phantomjs which has the ghostdriver
built-in.

a) Add the following packages:

sudo pkg_add jre
sudo pkg_add phantomjs
sudo pkg_add python-3.3.2

b) Fetch Selenium and install the Python module

sudo pip-3.3 install selenium
ftp 
http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar

c) Fire up the server

java -jar selenium-server-standalone-2.42.2.jar &
phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://127.0.0.1: &

d) Write a test!

#!/usr/local/bin/python3.3 
from selenium import webdriver
browser = webdriver.PhantomJS(executable_path="/usr/local/bin/phantomjs")
browser.get("http://openbsd.org/";)
assert "OpenBSD" in browser.title
print("DONE")

-- 
Eric Radman



Re: py-selenium and OpenBSD

2014-06-19 Thread Jiri B
On Thu, Jun 19, 2014 at 08:21:11PM -0700, Craig Paulette wrote:
> 
> Hello,
> 
> I'm relatively new to OpenBSD (6+ months and two CD sets) -- love it.
> I'm attempting to do some web development on OpenBSD but can't get
> py-selenium to work.  This thread shows that I'm not alone:
> http://openbsd.7691.n7.nabble.com/py-selenium-td238035.html
> 
> I can't be the only one trying to use py-selenium on OpenBSD.  What is
> everyone else doing as a workaround in the meantime?
> 
> Thanks in advance,
> Craig

It should work while using remote browser or not?

My old WIP:

https://github.com/jirib/openbsd-mystuff/blob/master/devel/selenium/Makefile
https://github.com/jirib/openbsd-mystuff/blob/master/devel/py-selenium/Makefile

If you have issues please file bugs upstream. Please keep
us updated ;)

j.