1 Star 0 Fork 0

touchx/django-selenium-helpers

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
Michał Pasternak 提交于 2015-12-01 03:39 +08:00 . Update README
LEGACY CODE AHEAD
-----------------
*Don't use for new projects!* Use Splinter <https://splinter.readthedocs.org/en/latest/> instead.
About
-----
django-selenium-helpers is a small but powerful package, inspired by a `very interesting blog post <https://blogs.gnome.org/danni/2012/11/19/extending-selenium-with-jquery/>`_. It makes testing your `Django <http://djangoproject.com>`_-powered pages with `Selenium <http://seleniumhq.com>`_, that utilize `JQuery <http://jquery.com/>`_ a breeze by providing a set of powerful functions to use
Code sample
-----------
.. code-block:: python
from selenium_helpers import SeleniumTestCase, wd
class MyWebPage(wd()):
def get_button(self):
return self.find_element_by_jquery("#button")
class MyTestCase(SeleniumTestCase):
def setUp(self):
self.page = MyWebPage()
self.page.open("/")
def tearDown(self):
self.page.quit()
def test_click(self):
b = self.page.get_button()
b.click()
self.assertEquals(b.visible(), True)
License
--------
This package is released under the MIT License.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/touchx_admin/django-selenium-helpers.git
git@gitee.com:touchx_admin/django-selenium-helpers.git
touchx_admin
django-selenium-helpers
django-selenium-helpers
master

搜索帮助