Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-utils
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
xblock-utils
Commits
0c636f24
Commit
0c636f24
authored
Nov 27, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3 from open-craft/kelketek/add-wait-until-exists
Added 'wait until exists' method.
parents
7d7201fb
37ec79be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
xblockutils/base_test.py
+5
-1
No files found.
xblockutils/base_test.py
View file @
0c636f24
...
...
@@ -61,12 +61,16 @@ class SeleniumBaseTest(SeleniumTest):
def
wait_until_clickable
(
self
,
elem
):
wait
=
WebDriverWait
(
elem
,
self
.
timeout
)
wait
.
until
(
lambda
e
:
e
.
is_displayed
()
and
e
.
is_enabled
(),
u"{} should be clic
l
able"
.
format
(
elem
.
text
))
wait
.
until
(
lambda
e
:
e
.
is_displayed
()
and
e
.
is_enabled
(),
u"{} should be clic
k
able"
.
format
(
elem
.
text
))
def
wait_until_text_in
(
self
,
text
,
elem
):
wait
=
WebDriverWait
(
elem
,
self
.
timeout
)
wait
.
until
(
lambda
e
:
text
in
e
.
text
,
u"{} should be in {}"
.
format
(
text
,
elem
.
text
))
def
wait_until_exists
(
self
,
selector
):
wait
=
WebDriverWait
(
self
.
browser
,
self
.
timeout
)
wait
.
until
(
lambda
driver
:
driver
.
find_element_by_css_selector
(
selector
),
u"Selector '{}' should exist."
)
def
go_to_page
(
self
,
page_name
,
css_selector
=
None
):
"""
Navigate to the page `page_name`, as listed on the workbench home
...
...
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