SeleniumHQ.selenium
Moduł Selenium dla Ansible
Zainstaluj go! ansible-galaxy install SeleniumHQ.selenium
Użyj go
Po zainstalowaniu modułu za pomocą ansible galaxy, weź plik library/selenium
i umieść go w odpowiednim miejscu do twojego użytku.
Dołącz go do swojego playbooka/rol:
- name: Uruchom serwer standalone
selenium:
role: standalone
state: running
- name: Uruchom serwer standalone (konkretna wersja selenium)
selenium:
version: 2.53.1
role: standalone
state: running
- name: Uruchom podstawowy grid, który nasłuchuje na porcie 4444
selenium:
role: hub
state: running
- name: Uruchom grid, który działa na porcie 4445
selenium:
role: hub
state: running
args:
port: 4445
- name: Uruchom grid z większą pamięcią
selenium:
role: hub
state: running
javaargs:
- Xmx1024M
- Xmy1024M
- name: Uruchom podstawowy węzeł, który łączy się lokalnie
selenium:
role: node
state: running
args:
hubUrl: http://0.0.0.0:4444
- name: Zrestartuj działający węzeł, który nasłuchiwał na poprzednim porcie
selenium:
role: node
state: restarted
args:
hubUrl: http://0.0.0.0:4445
- name: Uruchom węzeł, który używa konfiguracji JSON i ma plik dziennika
roles:
- name: wyprowadź plik konfiguracyjny
template: src=config.json.j2 dest=config.json
- name: uruchom węzeł
selenium:
role: node
state: running
logfile: node.log
args:
nodeConfig: config.json
- name: Zatrzymaj działający serwer selenium standalone
selenium:
state: stopped
Rozwój
(Poniższe instrukcje są dla tych, którzy używają Vagrant)
Przed uruchomieniem testów:
alias test-module=/home/vagrant/ansible/hacking/test-module
Aby przetestować moduł ręcznie, możesz uruchomić:
cd library/
test-module -m ./selenium -a "role=hub state=running"
Aby uruchomić wszystkie testy:
cd tests/
ansible-playbook -i localhost, test.yml
Zainstaluj
ansible-galaxy install SeleniumHQ.selenium
Licencja
apache-2.0
Pobrania
2.3k
Właściciel
Selenium is an umbrella project for a range of tools and libraries that enable and support the automation of web browsers.