Skip to main content

An extension library for selenium

Project description

https://travis-ci.org/starofrainnight/rabird.selenium.svg?branch=master

This library is an extension library build on top of selenium.

It provided a bunch features that need in production enviroment but selenium have not provide yet or won’t provided by design even in future:

  • Added force_xxx() series functions to invoke the element directly even the element be covered by other elements. Just as force_click(), force_focus(), etc…

  • Added force_get() method to webdriver, it will stop the page loading after page loading timeout exception happen, so that the next script could just run without break by that exception.

  • Added ability to set element’s attribute

  • Provided xpath_find(), xpath_find_all(), etc. For simply invoke xpath for recursively find elements. it would iterate each frame and each window to find your elements and do the actions without switch frame manually, that could reduce a great lot jobs.

  • Provided some advance UI class to wrap for some third-parties editors ( Just like TinyMCE )

Usage

Simple xpath_find_all() sample:

import time
import rabird.selenium
rabird.selenium.monkey_patch()
from rabird.selenium import webdriver

driver = webdriver.Chrome()
webdriver.set_recommend_preferences(driver)

driver.force_get("http://www.bing.com")

elements = driver.xpath_find_all("//*[@id='sb_form_q']")

print(elements)

time.sleep(10)

Changes

0.11.0 (2018-02-8)

  • Added dockerized webdriver support

0.9.0 (2018-01-02)

  • Make screenshot related functions works on all webdriver

0.7.0 (2017-06-22)

  • Fixed script freeze during long run

0.4.1 (2015-08-18)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rabird.selenium-0.11.2.tar.gz (17.7 kB view details)

Uploaded Source

File details

Details for the file rabird.selenium-0.11.2.tar.gz.

File metadata

File hashes

Hashes for rabird.selenium-0.11.2.tar.gz
Algorithm Hash digest
SHA256 b08f91848dbff51442b1d6c14a42fe009a59edf885dd81442932e9d860b187f7
MD5 17efdcba9a5163a2cf31a0659c840671
BLAKE2b-256 915192c9c9c0d2a09da02362972dd5c608acbe33b8b8200ad78a56344790daab

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page