SeleniumHQ.selenium
Seleniumモジュール for Ansible
インストールしよう! ansible-galaxy install SeleniumHQ.selenium
使い方
ansible galaxy を使ってモジュールをインストールした後、library/selenium
ファイルを取り、必要な場所に置いてください。
プレイブック/ロールに含める:
- name: スタンドアロンサーバーを起動する
selenium:
role: standalone
state: running
- name: スタンドアロンサーバーを起動する(特定のSeleniumバージョン)
selenium:
version: 2.53.1
role: standalone
state: running
- name: ポート4444でリッスンする基本グリッドを起動する
selenium:
role: hub
state: running
- name: ポート4445で動作するグリッドを起動する
selenium:
role: hub
state: running
args:
port: 4445
- name: より大きなメモリでグリッドを起動する
selenium:
role: hub
state: running
javaargs:
- Xmx1024M
- Xmy1024M
- name: ローカル接続する基本ノードを起動する
selenium:
role: node
state: running
args:
hubUrl: http://0.0.0.0:4444
- name: 前のポートでリッスンしていたノードを再起動する
selenium:
role: node
state: restarted
args:
hubUrl: http://0.0.0.0:4445
- name: JSON設定を使用し、ログファイルを持つノードを起動する
roles:
- name: 設定ファイルを出力する
template: src=config.json.j2 dest=config.json
- name: ノードを起動する
selenium:
role: node
state: running
logfile: node.log
args:
nodeConfig: config.json
- name: 実行中のSeleniumスタンドアロンサーバーを停止する
selenium:
state: stopped
開発
(以下の手順はVagrantを使用している方向けです)
テストを実行する前に:
alias test-module=/home/vagrant/ansible/hacking/test-module
モジュールを手動でテストするには、次のコマンドを実行します:
cd library/
test-module -m ./selenium -a "role=hub state=running"
すべてのテストを実行するには:
cd tests/
ansible-playbook -i localhost, test.yml
インストール
ansible-galaxy install SeleniumHQ.selenium
ライセンス
apache-2.0
ダウンロード
2.3k
所有者
Selenium is an umbrella project for a range of tools and libraries that enable and support the automation of web browsers.