Selenium/appium-based Page Objects test library.
Project description
### poium
基于 selenium/appium 的 Page Objects 设计模式测试库。
* 支持大部分selenium/appium API。
* 封装元素定位操作,以及少量原生API,同时并不影响原生API的使用。
#### Installation
------------
download install:
```shell
$ python setup.py install
```
pip install:
```
$ pip install poium
```
#### 简单例子:
使用poium实现百度搜索。
```python
# baidu_page.py
from page_objects import PageObject, PageElement
class BaiduIndexPage(PageObject):
search_input = PageElement(id_='kw', describe="搜索输入框")
search_button = PageElement(id_='su', describe="搜索按钮")
# test_baidu.py
from selenium import webdriver
from baidu_page import BaiduIndexPage
driver = webdriver.Chrome()
page = BaiduIndexPage(driver)
page.get("https://www.baidu.com")
page.search_input.send_keys("poium")
page.search_button.click()
driver.quit()
```
使用poium将元素 __定位__ 与 __操作__ 分离,这将会非常有助于规模化自动化测试用例的编写与维护。
#### 使用文档:
请阅读 [wiki](https://github.com/defnngj/poium/wiki)
#### 项目历史:
参考项目:https://github.com/eeaston/page-objects
参考项目已经不再维护,我阅读了原项目代码,虽然只有100多行,但设计非常精妙。本项目在此基础上进行开发。
原项目名:https://pypi.org/project/selenium-page-objects/
有一天,我向群里的同学推荐selenium-page-objects,有同学问是否支持appium,appium也是从selenium继承而来,我想为什么不能支持appium呢?
于是,加入了appium支持,但是 selenium-page-objects 已经不能表达对appium的支持,而且他似乎有点长了。
本项目的核心是 Page Objects的设计模式, 于是取了 __PO__,同时支持selenium/appium,于是取了 __ium__,那么新的项目命名为:__poium__。
基于 selenium/appium 的 Page Objects 设计模式测试库。
* 支持大部分selenium/appium API。
* 封装元素定位操作,以及少量原生API,同时并不影响原生API的使用。
#### Installation
------------
download install:
```shell
$ python setup.py install
```
pip install:
```
$ pip install poium
```
#### 简单例子:
使用poium实现百度搜索。
```python
# baidu_page.py
from page_objects import PageObject, PageElement
class BaiduIndexPage(PageObject):
search_input = PageElement(id_='kw', describe="搜索输入框")
search_button = PageElement(id_='su', describe="搜索按钮")
# test_baidu.py
from selenium import webdriver
from baidu_page import BaiduIndexPage
driver = webdriver.Chrome()
page = BaiduIndexPage(driver)
page.get("https://www.baidu.com")
page.search_input.send_keys("poium")
page.search_button.click()
driver.quit()
```
使用poium将元素 __定位__ 与 __操作__ 分离,这将会非常有助于规模化自动化测试用例的编写与维护。
#### 使用文档:
请阅读 [wiki](https://github.com/defnngj/poium/wiki)
#### 项目历史:
参考项目:https://github.com/eeaston/page-objects
参考项目已经不再维护,我阅读了原项目代码,虽然只有100多行,但设计非常精妙。本项目在此基础上进行开发。
原项目名:https://pypi.org/project/selenium-page-objects/
有一天,我向群里的同学推荐selenium-page-objects,有同学问是否支持appium,appium也是从selenium继承而来,我想为什么不能支持appium呢?
于是,加入了appium支持,但是 selenium-page-objects 已经不能表达对appium的支持,而且他似乎有点长了。
本项目的核心是 Page Objects的设计模式, 于是取了 __PO__,同时支持selenium/appium,于是取了 __ium__,那么新的项目命名为:__poium__。
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 Distribution
poium-0.2.3.tar.gz
(6.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
poium-0.2.3-py3-none-any.whl
(8.1 kB
view details)
File details
Details for the file poium-0.2.3.tar.gz.
File metadata
- Download URL: poium-0.2.3.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b6109c652e8cd1846134d8ec1a99199c48aaa6cb0e1102614bba129c3e0be4b
|
|
| MD5 |
f20a17066352929fe7f6de5f7d7a8da5
|
|
| BLAKE2b-256 |
8542269aa69728ce27ed1e9d0e9efc816ea71fdc9ee1c65471894afe32a1fb32
|
File details
Details for the file poium-0.2.3-py3-none-any.whl.
File metadata
- Download URL: poium-0.2.3-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
557081ecd928912777742298d8aad8a4b67f29b25b56305c91359f612695235e
|
|
| MD5 |
8e9b09f9e2929b8a03f65b046f78f855
|
|
| BLAKE2b-256 |
b97994367f5d8e9ebd88d8b3a3fc337e3b1aea16b6c2980b4761682feea27a1b
|