# Testwizard - Mobile
> Python language support for testing Mobile devices using testwizard
## Usage
* import the [testwizard.core](https://pypi.org/project/testwizard.core/) and the testwizard.mobile packages
* get a sesion and use it to create a mobile testobject.
* Use this object to execute commands
You can use the session to add results that will be reported to the robot when the script finishes or set results that will be posted immediately.
## Sample
### Python (mobile.py)
```Python
import sys
import time
from testwizard.core import TestWizard
from testwizard.core import ResultCodes
from testwizard.mobile import Mobile
with TestWizard() as TW:
session = TW.session
print(session.args['param1'])
print(session.args['param2'])
mobile = Mobile(session, "Mobile")
print("InitDriver")
result = mobile.initDriver()
print(result.message)
if (not result.success):
session.addFail(result.message)
# Add your commands here
print("QuitDriver")
result = mobile.quitDriver()
print(result.message)
if (not result.success):
session.addFail(result.message)
if (not (session.hasFails() or session.hasErrors())):
session.setResult(ResultCodes.PASS, "Test was successful")
```
### sidecar file (mobile.json)
```json
{
"tester": "Some tester",
"parameters": [
{ "name": "param1", "value": "value1"},
{ "name": "param2", "value": "value2"}
],
"resources": [{ "category": "MOBILE", "name": "Mobile", "id": "Mobile 1"}
],
"outputFolder": "c:\\temp"
}
```
## License
[Testwizard licensing](https://www.eurofins-digitaltesting.com/testwizard/)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共11个文件
txt:4个
py:3个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:testwizard.mobile-1.0.3.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
testwizard.mobile-1.0.3.tar.gz (11个子文件)
testwizard.mobile-1.0.3
PKG-INFO 3KB
testwizard
mobile
__init__.py 26B
Mobile.py 18KB
testwizard.mobile.egg-info
PKG-INFO 3KB
requires.txt 158B
SOURCES.txt 280B
top_level.txt 11B
dependency_links.txt 1B
setup.cfg 42B
setup.py 897B
README.md 2KB
共 11 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功