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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
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
Hide 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):
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