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
51dc6f3b
Commit
51dc6f3b
authored
Oct 03, 2014
by
dragonfi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add wait_until_hidden to SeleniumBaseTest
parent
a295d4b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
xblockutils/base_test.py
+7
-3
No files found.
xblockutils/base_test.py
View file @
51dc6f3b
...
@@ -53,17 +53,21 @@ class SeleniumBaseTest(SeleniumTest):
...
@@ -53,17 +53,21 @@ class SeleniumBaseTest(SeleniumTest):
header1
=
self
.
browser
.
find_element_by_css_selector
(
'h1'
)
header1
=
self
.
browser
.
find_element_by_css_selector
(
'h1'
)
self
.
assertEqual
(
header1
.
text
,
'XBlock scenarios'
)
self
.
assertEqual
(
header1
.
text
,
'XBlock scenarios'
)
def
wait_until_hidden
(
self
,
elem
):
wait
=
WebDriverWait
(
elem
,
self
.
timeout
)
wait
.
until
(
lambda
e
:
not
e
.
is_displayed
(),
u"{} should be hidden"
.
format
(
elem
.
text
))
def
wait_until_disabled
(
self
,
elem
):
def
wait_until_disabled
(
self
,
elem
):
wait
=
WebDriverWait
(
elem
,
self
.
timeout
)
wait
=
WebDriverWait
(
elem
,
self
.
timeout
)
wait
.
until
(
lambda
e
:
not
e
.
is_enabled
(),
"{} should be disabled"
.
format
(
elem
.
text
))
wait
.
until
(
lambda
e
:
not
e
.
is_enabled
(),
u
"{} should be disabled"
.
format
(
elem
.
text
))
def
wait_until_clickable
(
self
,
elem
):
def
wait_until_clickable
(
self
,
elem
):
wait
=
WebDriverWait
(
elem
,
self
.
timeout
)
wait
=
WebDriverWait
(
elem
,
self
.
timeout
)
wait
.
until
(
lambda
e
:
e
.
is_displayed
()
and
e
.
is_enabled
(),
"{} should be cliclable"
.
format
(
elem
.
text
))
wait
.
until
(
lambda
e
:
e
.
is_displayed
()
and
e
.
is_enabled
(),
u
"{} should be cliclable"
.
format
(
elem
.
text
))
def
wait_until_text_in
(
self
,
text
,
elem
):
def
wait_until_text_in
(
self
,
text
,
elem
):
wait
=
WebDriverWait
(
elem
,
self
.
timeout
)
wait
=
WebDriverWait
(
elem
,
self
.
timeout
)
wait
.
until
(
lambda
e
:
text
in
e
.
text
,
"{} should be in {}"
.
format
(
text
,
elem
.
text
))
wait
.
until
(
lambda
e
:
text
in
e
.
text
,
u
"{} should be in {}"
.
format
(
text
,
elem
.
text
))
def
go_to_page
(
self
,
page_name
,
css_selector
=
None
):
def
go_to_page
(
self
,
page_name
,
css_selector
=
None
):
"""
"""
...
...
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