类硒食品

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.

发展

# 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卸载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}}"

还有more examples

使用Jupyter笔记本

安装内核

  • jupyter kernelspec安装——用户seleniblepiter

实例

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Intellij通过方法中的包查找用法   java中VS代码和打包命名的问题   将java CMS功能集成到具有高度动态内容的网站(Lucene/Mysql/Nosql)的策略   oracle的java类强制转换异常。jdbc。驾驶员OracleConnection   字节码向JVM添加上指令   如何在抽象类中执行java方法?   java是否可以在apache访问日志中排除指定的GET参数?(作者:W7开发环境)   java如何获取已安装音频播放器的列表?   尝试向HS学生展示如何使用Java访问MS数据库   使用正则表达式java对给定行中的特定字符串进行计数   java JOOQ Select查询中的Select计数   方法Java,如何从二维双精度数组中找到特定值?   获取图像URL的java正则表达式   java在切换到新的窗口驱动程序后找不到元素