Skip to main content

Selenium/appium-based Page Objects test library.

Project description

Page Objects design pattern test library; support selenium、appium、playwright, etc

Page Objects 设计模式测试库;支持 selenium、appium、playwright 等。

Features

  • 极简的Page层的元素定义
  • 对原生 API 无损
  • 支持 logger 日志

支持库:

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

Demo

通过下面的例子,体会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.open("https://www.baidu.com")

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

driver.quit()

更多例子,请点击这里

Documentation

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

other:

Old version

  • poium < 0.6.0

参考文档

  • poium>=0.6.0, <1.0.0

参考文档

Project History

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

selenium-page-objects是poium的前身,为了简化项目名称,改名为poium。po 取自 Page Object 首字母, ium 取自selenium/appium 共同后缀。

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.3.1.tar.gz (28.3 kB view hashes)

Uploaded Source

Built Distribution

poium-1.3.1-py3-none-any.whl (36.2 kB view hashes)

Uploaded Python 3

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