mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
some improvements
This commit is contained in:
parent
934f2087fa
commit
32ffd3a336
@ -3,16 +3,16 @@
|
|||||||
import os
|
import os
|
||||||
from pyvirtualdisplay import Display
|
from pyvirtualdisplay import Display
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from exceptions import AssertionError
|
|
||||||
|
|
||||||
# Are we running headless?
|
# Are we running headless?
|
||||||
if ('DISPLAY' not in os.environ):
|
if ('DISPLAY' not in os.environ):
|
||||||
display = Display(visible=0, size=(1920, 1080))
|
display = Display(visible=0, size=(1920, 1080))
|
||||||
display.start()
|
display.start()
|
||||||
|
|
||||||
|
browser = webdriver.Firefox(timeout=15)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Go to the installation page.
|
# Go to the installation page.
|
||||||
browser = webdriver.Firefox(timeout=15)
|
|
||||||
browser.implicitly_wait(5)
|
browser.implicitly_wait(5)
|
||||||
browser.get('http://localhost/pandora_console/install.php')
|
browser.get('http://localhost/pandora_console/install.php')
|
||||||
assert("Pandora FMS - Installation Wizard" in browser.title)
|
assert("Pandora FMS - Installation Wizard" in browser.title)
|
||||||
@ -32,8 +32,8 @@ try:
|
|||||||
browser.implicitly_wait(5)
|
browser.implicitly_wait(5)
|
||||||
assert("Installation complete" in browser.page_source)
|
assert("Installation complete" in browser.page_source)
|
||||||
browser.find_element_by_name("rn_file").click()
|
browser.find_element_by_name("rn_file").click()
|
||||||
except AssertionError:
|
except AssertionError as error:
|
||||||
print(browser.page_source)
|
print("Error " + str(error) + ":\n" + browser.page_source)
|
||||||
|
|
||||||
|
|
||||||
# Clean-up
|
# Clean-up
|
||||||
|
Loading…
x
Reference in New Issue
Block a user