Stop/Start services on Live automation

Use selenium to operate service management website.

Prepare:

Install python support units on controller server

# install Python 2.7 and selenium

sudo yum install centos-release-scl # install SCL 
sudo yum install python27
scl enable python27 bash
pip install --upgrade pip
yum install gcc
pip install psutil
pip install -U selenium

Set firewall rule on selenium server and PA to enable communication between controller server and selenium server.

Install selenium server, java, chrome support units on webadmin server (QA:app1 Live:webadmin )

selenium-server:install JRE

selenium-server file need:

Another way: Use Docker to install selenium server

documents to learn python and selenium

selenium:

http://selenium-python.readthedocs.io/getting-started.html

http://www.seleniumhq.org/docs/

python:

https://www.tutorialspoint.com/python/index.htm

Test on QA

upload script to saltmaster

hange in different area

1.username password for server [not in python script] 2.monitorServer and seleniumServer 3.QA use 'servicename' but live use 'hostname', change xpath 2 to 1 4.all hostname, seq and list define 5.in main function, change all excute Seq

step to update stop&start python script

1.clean old version scripts

2.upload script

3.mv new script and chmod

4.compile

5.rm .py

6.execute

adminweb:

open selenium-server

saltmaster:

for example:

[VN QA]

an use force mode by:

Last updated