Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
481c2c37
Commit
481c2c37
authored
May 25, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5TypeFunctionalTestCase: dump the correct page in case of failure
parent
959d6669
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+6
-6
No files found.
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
View file @
481c2c37
...
@@ -177,18 +177,18 @@ class WebDriverWait(_WebDriverWait):
...
@@ -177,18 +177,18 @@ class WebDriverWait(_WebDriverWait):
return
super
(
WebDriverWait
,
self
).
until
(
*
args
)
return
super
(
WebDriverWait
,
self
).
until
(
*
args
)
except
:
except
:
logger
.
exception
(
"unable to find login field, dumping the page"
)
logger
.
exception
(
"unable to find login field, dumping the page"
)
try
:
with
open
(
os
.
path
.
join
(
log_directory
,
'page-screenshot.png'
),
'wb'
)
as
f
:
f
.
write
(
self
.
_driver
.
get_screenshot_as_png
())
except
:
logger
.
exception
(
"error when taking screenshot"
)
try
:
try
:
with
open
(
os
.
path
.
join
(
log_directory
,
'page.html'
),
'w'
)
as
f
:
with
open
(
os
.
path
.
join
(
log_directory
,
'page.html'
),
'w'
)
as
f
:
f
.
write
(
f
.
write
(
self
.
_driver
.
execute_script
(
self
.
_driver
.
execute_script
(
"return document.getElementById('
testSuiteF
rame').contentDocument.querySelector('html').innerHTML"
))
"return document.getElementById('
selenium_myif
rame').contentDocument.querySelector('html').innerHTML"
))
except
:
except
:
logger
.
exception
(
"error when dumping page"
)
logger
.
exception
(
"error when dumping page"
)
try
:
with
open
(
os
.
path
.
join
(
log_directory
,
'page-screenshot.png'
),
'wb'
)
as
f
:
f
.
write
(
self
.
_driver
.
get_screenshot_as_png
())
except
:
logger
.
exception
(
"error when taking screenshot"
)
raise
raise
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment