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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
e69d4b40
Commit
e69d4b40
authored
May 25, 2024
by
Jérome Perrin
Committed by
Kazuhiko Shiozaki
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5TypeFunctionalTestCase: dump the correct page in case of failure
parent
65befb55
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 @
e69d4b40
...
...
@@ -177,18 +177,18 @@ class WebDriverWait(_WebDriverWait):
return
super
(
WebDriverWait
,
self
).
until
(
*
args
)
except
:
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
:
with
open
(
os
.
path
.
join
(
log_directory
,
'page.html'
),
'w'
)
as
f
:
f
.
write
(
self
.
_driver
.
execute_script
(
"return document.getElementById('
testSuiteF
rame').contentDocument.querySelector('html').innerHTML"
))
"return document.getElementById('
selenium_myif
rame').contentDocument.querySelector('html').innerHTML"
))
except
:
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
...
...
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