GithubHelp home page GithubHelp logo

irfanahmadin / ansible-selenium Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seleniumhq/ansible-selenium

0.0 1.0 0.0 26 KB

Module for managing a grid / nodes using Ansible

Home Page: https://galaxy.ansible.com/SeleniumHQ/selenium/

License: Apache License 2.0

Python 84.73% Shell 15.27%

ansible-selenium's Introduction

Selenium module for Ansible

Get it! ansible-galaxy install SeleniumHQ.selenium star this repo fork this repo

Use It

After using ansible galaxy to install the module, take the library/selenium file, and put it where relevant for your use.

Include it in your playbook/roles:

- name: Start a standalone server
  selenium:
    role: standalone
    state: running

- name: Start a standalone server (specific selenium version)
  selenium:
    version: 2.53.1 
    role: standalone
    state: running
    
- name: Start a basic grid that listens on port 4444
  selenium:
    role: hub
    state: running

- name: Start a grid that runs on port 4445
  selenium:
    role: hub
    state: running
    args:
      port: 4445

- name: Start the grid with greater memory
  selenium:
    role: hub
    state: running
    javaargs:
      - Xmx1024M
      - Xmy1024M

- name: Start a basic node that connects locally
  selenium:
    role: node
    state: running
    args:
      hubUrl: http://0.0.0.0:4444

- name: Restart a running node that was listening on a previous port
  selenium:
    role: node
    state: restarted
    args:
      hubUrl: http://0.0.0.0:4445

- name: Start a node that uses a JSON config and has a logfile
  roles:
    - name: output the config file
      template: src=config.json.j2 dest=config.json

    - name: start the node
      selenium:
        role: node
        state: running
        logfile: node.log
        args:
          nodeConfig: config.json

- name: Stop the running selenium standalone server
  selenium:
    state: stopped

Develop

(The following instructions are for those using Vagrant)

Before running tests:

alias test-module=/home/vagrant/ansible/hacking/test-module

To test the module manually, you can run:

cd library/
test-module -m ./selenium -a "role=hub state=running"

To run all tests:

cd tests/
ansible-playbook -i localhost, test.yml

ansible-selenium's People

Contributors

bartfeenstra avatar ddavison avatar detoo avatar matthewlmcclure 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.