Skip to main content

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

Links

Metadata

Release files for selenible 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for selenible 0.0.4
File Interpreter ABI Platform Actions
selenible-0.0.4-py3-none-any.whl Python 3 none any Details for selenible-0.0.4-py3-none-any.whl

Release files / selenible-0.0.4-py3-none-any.whl

Download URL selenible-0.0.4-py3-none-any.whl
Size 32.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef04d905269507e541a9bfc313a30751c47128701520ed0622f15440ec26d33b
BLAKE2b-256 checksum
How to use checksums
665645939021bed63680d12f490b3ad76c0989bd77fa6514c916a16c1bcf4f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

Security for selenible 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page