Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
71f237d3
Commit
71f237d3
authored
Oct 31, 2014
by
Jesse Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fix lettuce css_fill method for devstack"
This reverts commit
471abb8c
.
parent
471abb8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
17 deletions
+1
-17
common/djangoapps/terrain/ui_helpers.py
+1
-17
No files found.
common/djangoapps/terrain/ui_helpers.py
View file @
71f237d3
...
@@ -526,23 +526,7 @@ def css_fill(css_selector, text, index=0):
...
@@ -526,23 +526,7 @@ def css_fill(css_selector, text, index=0):
Then for synchronization purposes, wait for the value on the page.
Then for synchronization purposes, wait for the value on the page.
"""
"""
wait_for_visible
(
css_selector
,
index
=
index
)
wait_for_visible
(
css_selector
,
index
=
index
)
retry_on_exception
(
lambda
:
css_find
(
css_selector
)[
index
]
.
fill
(
text
))
# HACK:
# At some point, in devstack strings were no longer being filled into fields
# correctly under our original implementation which used splinter's fill method.
# Instead everything after certain letters (E.g. e and r) was getting truncated.
#
# Note that troubleshooting showed that this happened both with the splinter "fill"
# method, and directly with its underlying selenium implementation which is
# self._element.clear() followed by self._element.send_keys(value)
#
# As a workaround, wait for the element to be visible, then use JS to set its value.
retry_on_exception
(
lambda
:
css_find
(
css_selector
)[
index
]
is
not
None
)
world
.
browser
.
driver
.
execute_script
(
'window.jQuery("{css_selector}").val("{text}");'
.
format
(
css_selector
=
css_selector
,
text
=
text
))
wait_for
(
lambda
_
:
css_has_value
(
css_selector
,
text
,
index
=
index
))
wait_for
(
lambda
_
:
css_has_value
(
css_selector
,
text
,
index
=
index
))
return
True
return
True
...
...
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