类硒食品
selenible的Python项目详细描述
硒
硒喜欢食用吗
# open google and take screenshot-name:open urlopen:https://www.google.com-name:screenshotscreenshot:output.png
要求
- Python3
- selenium网络驱动程序
- 幽灵
- 铬
- 火狐
- 等等
安装
- PIP安装selenible
用法
# selenible
Usage: selenible [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
--verbose
--quiet
--logfile PATH
--help Show this message and exit.
Commands:
browser-options show browser options
dump-schema dump json schema
list-modules list modules
run run playbook
validate validate by json schema
# selenible list-modules
+------------------+-----------------------------------------------------------+
| Module | Description |
+==================+===========================================================+
| alertOK | - name: accept alert |
| | alertOK: true |
| | - name: cancel alert |
| | alertOK: false |
+------------------+-----------------------------------------------------------+
| auth | - name: basic/digest auth |
| | auth: |
:
# selenible run --help
Usage: selenible run [OPTIONS] [INPUT]
run playbook
Options:
--driver [phantom|chrome|firefox|safari|edge|webkit|dummy|ie|opera|android|remote]
-x, --extension TEXT
--step
--screenshot
-e TEXT
--var FILENAME
--help Show this message and exit.
发展
- git克隆https://github.com/wtnb75/selenible.git
- 可硒化镉
- pip安装-r requirements.txt
# python -m selenible.cli
Usage: cli.py [OPTIONS] COMMAND [ARGS]...
:
# python -m selenible.cli list-modules
+--------------+---------------------------------------------------------------+
| Module | Description |
+==============+===============================================================+
| alertOK | - name: accept alert |
| | alertOK: true |
| | - name: cancel alert |
:
安装头部
- pip安装-e'git+https://github.com/wtnb75/selenible.git#egg=selenible'
- selenible—帮助
- 。
(卸载)
- pip卸载selenible-y
实例
# input text into translate service and get new text-name:get textset:input_multiline:"input(ctrl-d):"register:srcwhen_not:defined:src-name:opengoogletranslateopen:https://translate.google.com/-name:setinputsetTextValue:text:"{{src}}"id:source-name:sleepsleep:3-name:getoutputsave:mode:textid:result_boxregister:dst-name:resultecho:"{{dst}}"
使用Jupyter笔记本
安装内核
- jupyter kernelspec安装——用户seleniblepiter