#Important Readme(under construction)
#Installations cd ~/ sudo apt-get install python-pip sudo pip install selenium sudo apt-get install git sudo pip install unittest-xml-reporting
#for jenkins sudo apt-get -y install xvfb sudo chmod 777 /run/user/ #NOTE: If using selenium with firefox48 and above, use the mariotte setting commented in the driver.py file or use selenium 3.0 or above(it is enabled by default)
#Geckodriver git clone https://github.com/rishabh27892/webui-test-files/ cd webui-test-files/ tar -xvzf geckodriver-v0.23.0-linux64.tar.gz chmod +x geckodriver sudo cp geckodriver /usr/local/bin/ cd ~/ rm -rf webui-test-files/
#Installation for TrueOS(firefox beta doesnt support selenium yet, hence firefox-esr) pkg-static install firefox-esr pkg-static install -y python36 pkg-static install -y py36-pip pkg-static install -y py36-pytest pkg-static install -y geckodriver pip-3.6 install selenium pip-3.6 install unittest-xml-reporting
#Tests……. NOTE: When locating an element using XPATH, do not use the xpath with id like this example: "md-input-18"(since this is autogenerated id, which changes with browser and various other reasons=unreliable) instead, delete this attribute, via element inspector, and then find the xpath, which should locate the element from a simple id in numerals like: "8" (explicitly asigned=reliable, which wont change for any reason)
#Jenkins instructions 10.20.20.72 - rishabh-server.tn.ixsystems.com (Jenkins master node) This virtual machine will run the jenkins web interface only https://10.20.20.72:8180/jenkins
10.20.20.73 - rishabh-desktop.tn.ixsystems.com (Jenkins slave node) This virtual machine run tests with firefox 10.20.20.74 - rishabh-nas.tn.ixsystems.com (FreeNAS target for webui tests) This virtual machine will be the FreeNAS target running ui tests with firefox.
#Download freenas/webui repo Stable: git clone https://github.com/freenas/webui/ Unstable: git clone https://github.com/rishabh27892/webui cd webui/test/
#Selenium Grid- check webui/test/selenium-utils/README.md
Selenium-Grid (Dedicated selenium grid-server): No parameters #python runtest.py --ip <ip_of.the_machine.to_be.tested> Ubuntu (Local system): sudo python runtest.py --ip <ip_of.the_machine.to_be.tested> --test-name account --driver U Jenkin/TrueOS(Mostly depreciated): sudo python3.6 runtest.py --ip <10.20.21.216> --test-name account
Runtest #For running tests on a desktop, use driverU(U) and for selenium grid dedicated server no paramters at all, it will use driverG by default(null) #Use a fixed delay on the end of each script to fix script execution issue(similar to race condition) #click on main nav again before starting a new script to make sure failure of one script doesnt effect execution of the other
Sequence: acc_group acc_user net_conf serv_ssh serv_afp serv_smb serv_dns serv_ftp serv_iscsi serv_lldp serv_dc serv_webdav sys_update sys_email sys_advanced guide acc_edit acc_delete theme logout