Hi everyone,

I am trying to "mis"-use Selenium components as a simple cross-platform, 
cross-browser blackbox to control aspects of the browser.

Okay here the full scoop. In Zope 3 we recently developed the 
`zope.testbrowser` package, which allows us to write functional tests using a 
Python class that simulates being a browser. Here a small example:

    >>> from zope.testbrowser import Browser
    >>> browser = Browser()
    >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    >>> browser.addHeader('Accept-Language', 'en-US')
    >>> browser.open('http://localhost/@@/testbrowser/simple.html')
    >>> browser.url

    >>> browser.open('http://localhost/@@/testbrowser/navigate.html')
    >>> link = browser.getLink('Link Text')
    >>> link
    <Link text='Link Text'
    >>> link.text
    'Link Text'
    >>> link.url # it's normalized
    >>> link.attrs
    {'href': 'navigate.html?message=By+Link+Text'}
    >>> link.click()
    >>> browser.url

And this works great and I am very happy with it. However, now I would like to 
develop another backend to the `Browser` class that actually opens a browser 
of my choice and executes the `Browser` classes commands in the actual 

Clearly there are several ways to realize this, including DCOP (KDE only), 
PyXPCOM (Mozilla-only) and JSSh (Mozilla-only). However, all of those 
solutions have shortcomings, since they are platform and browser specific.
Since the Zope community has embraced Selenium and several people told me to 
look at selenium as another possibility, I really want to make all of this 
work using Selenium. I have downloaded the SVN version and tried to read some 
of the Javascript, but I am really lost.

I am looking for some hints, guidance, links or whatever to get this started.

Thanks for your help in advance!

Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to