Skip to main content

Selenium/appium-based Page Objects test library.

Project description

基于 selenium/appium 的 Page Objects 设计模式测试库。

  • 极大的简化了Page层的元素定义。
  • 同时支持selenium和appium
  • 通过JavaScript扩展了selenium API
  • 对原生 API 无损

Installation

pip install:

> pip install poium

If you want to keep up with the latest version, you can install with github repository url:

> pip install -U git+https://github.com/SeldomQA/poium.git@master

旧版本说明

poium < 0.6.0版本,主要提供了PagePageElementPageElementPageSelectPageWait等类。

参考文档

poium>=0.6.0, <1.0.0 版本,新增了NewPageElement类,用新的方式重新实现了PageElement类的大部分功能。 推荐使用NewPageElement 类。

参考文档

Sample

通过下面的例子,体会Page Objects 设计模式如此简单。

from poium import Page, Element
from selenium import webdriver


class BaiduIndexPage(Page):
    search_input = Element(name='wd')
    search_button = Element(id_='su')


driver = webdriver.Chrome()
page = BaiduIndexPage(driver)
page.get("https://www.baidu.com")

page.search_input.send_keys("poium") 
page.search_button.click()

driver.quit()

更多例子,请点击这里

Documentation

在开使用poium前,请快速阅读下面的文档。

Project usage

  • 在基于pytest的自动化项目中的应用,请点击这里

  • 在基于seldom自动化测试框架的应用,请点击这里

Project History

参考项目:https://github.com/eeaston/page-objects

参考项目已经不再维护,我阅读了原项目代码,虽然只有100多行,但设计非常精妙。本项目在此基础上进行开发。

原项目名:https://pypi.org/project/selenium-page-objects/

本项目的核心是 Page Objects设计模式, 于是取了 PO,同时支持selenium/appium,于是取了 ium,那么新的项目命名为:poium

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

poium-1.0.2.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poium-1.0.2-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file poium-1.0.2.tar.gz.

File metadata

  • Download URL: poium-1.0.2.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.9

File hashes

Hashes for poium-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d3ef4cd828605764ebee3091c3681e07fef33b1d5542f278b900c1f0360fe489
MD5 0b9e2a10224cf5167a9f21972ad8dc0a
BLAKE2b-256 929f9f7db15d818eeffe6844a44388c023cb3c052f934eab9083ece36cbf61f2

See more details on using hashes here.

File details

Details for the file poium-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: poium-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.9

File hashes

Hashes for poium-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 31ba83d4dc013d385404c701be693258053ca3bb746eab431158ce23f41f7054
MD5 3a58ac3da8e12596b49cf457a36c0fbe
BLAKE2b-256 401d0b1a94a7a8e8284aee105d1c96945e6b8bfb22d7a85395e0ec0cb94615ba

See more details on using hashes here.

Supported by

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