Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai
website
Commits
c5fbd5e5
Commit
c5fbd5e5
authored
3 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Revert to no-scrollbar screenshot approach
parent
0cc4bda8
No related branches found
No related tags found
1 merge request
!17
Upgrade to webpack + Bootstrap4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
render-test/render_test.py
+2
-2
2 additions, 2 deletions
render-test/render_test.py
with
2 additions
and
2 deletions
render-test/render_test.py
+
2
−
2
View file @
c5fbd5e5
...
...
@@ -42,8 +42,8 @@ def save_screenshot(driver, path):
required_width
=
driver
.
execute_script
(
'
return document.body.parentNode.scrollWidth
'
)
required_height
=
driver
.
execute_script
(
'
return document.body.parentNode.scrollHeight
'
)
driver
.
set_window_size
(
required_width
,
required_height
)
driver
.
save_screenshot
(
path
)
# has scrollbar
#
driver.find_element_by_tag_name('body').screenshot(path) # avoids scrollbar
#
driver.save_screenshot(path) # has scrollbar
driver
.
find_element_by_tag_name
(
'
body
'
).
screenshot
(
path
)
# avoids scrollbar
driver
.
set_window_size
(
original_size
[
'
width
'
],
original_size
[
'
height
'
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment