mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
dump html if python installation fails
This commit is contained in:
parent
8f364c3914
commit
934f2087fa
@ -3,12 +3,14 @@
|
||||
import os
|
||||
from pyvirtualdisplay import Display
|
||||
from selenium import webdriver
|
||||
from exceptions import AssertionError
|
||||
|
||||
# Are we running headless?
|
||||
if ('DISPLAY' not in os.environ):
|
||||
display = Display(visible=0, size=(1920, 1080))
|
||||
display.start()
|
||||
|
||||
try:
|
||||
# Go to the installation page.
|
||||
browser = webdriver.Firefox(timeout=15)
|
||||
browser.implicitly_wait(5)
|
||||
@ -30,6 +32,9 @@ browser.find_element_by_xpath("//*[@id='step5']").click()
|
||||
browser.implicitly_wait(5)
|
||||
assert("Installation complete" in browser.page_source)
|
||||
browser.find_element_by_name("rn_file").click()
|
||||
except AssertionError:
|
||||
print(browser.page_source)
|
||||
|
||||
|
||||
# Clean-up
|
||||
browser.quit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user