Selenium Webdriver wrapper with Selenium IDE-like functionality
Project description
spydr
Selenium Webdriver (Python binding) wrapper with Selenium IDE-like functionality
Install
pip install spydr
Using Sypdr Webdriver
# Basic Example
from spydr.webdriver import Spydr
s = Spydr()
s.maximize_window()
s.open('https://www.google.com/')
s.send_keys('name=q', 'webdriver', s.keys.ENTER)
s.save_screenshot('sample_shot')
s.quit()
# Handle Basic/Digest HTTP AUTH using Chrome
from spydr import webdriver
s = webdriver.Spydr(auth_username='guest', auth_password='guest')
s.open('https://jigsaw.w3.org/HTTP/Basic/')
s.save_screenshot('basic')
s.open('https://jigsaw.w3.org/HTTP/Digest/')
s.save_screenshot('digest')
s.quit()
# Handle Basic/Digest HTTP AUTH using non-Chrome
from spydr import webdriver
s = webdriver.Spydr(browser='firefox', auth_username='guest', auth_password='guest')
s.open_with_auth('https://jigsaw.w3.org/HTTP/Basic/')
s.save_screenshot('basic')
s.open_with_auth('https://jigsaw.w3.org/HTTP/Digest/')
s.save_screenshot('digest')
s.quit()
Supported locator
Format: 'how=what'
css=.btn
class=btn-primary
id=frame1
link_text=text
name=j_username
partial_link_text=text
tag_name=span
xpath=//span/a
If how is not specified, locator starting with /
or (
will be parsed as xpath, while .
, [
and #
are treated as css.
css pseudo selector support => :eq()
Project Home
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
spydr-0.1.1-py3-none-any.whl
(11.7 kB
view hashes)