Coder Social home page Coder Social logo

selenible's Introduction

selenible

do selenium like ansible

# open google and take screenshot
- name: open url
  open: https://www.google.com
- name: screenshot
  screenshot: output.png

requirements

  • python3
  • selenium webdriver
    • phantomjs
    • chrome
    • firefox
    • etc...

install

  • pip install selenible

usage

# 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.

development

# 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                                          |
   :

install HEAD

(uninstall)

  • pip uninstall selenible -y

examples

# input text into translate service and get new text
- name: get text
  set:
    input_multiline: "input(ctrl-d): "
  register: src
  when_not:
    defined: src
- name: open google translate
  open: https://translate.google.com/
- name: set input
  setTextValue:
    text: "{{src}}"
    id: source
- name: sleep
  sleep: 3
- name: get output
  save:
    mode: text
    id: result_box
  register: dst
- name: result
  echo: "{{dst}}"

and more examples...

work with jupyter notebook

install kernel

  • jupyter kernelspec install --user seleniblepiter

examples

selenible's People

Contributors

wtnb75 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.