[FT] Create waits, clickable/not_clickable
Opened this issue · 0 comments
netzulo commented
Obtained Behaviour
Not have wait_clicable method for ControlBase
and inherit classes
Expected Behaviour
- Have wait_clicable method for
ControlBase
and inherit classes - Have wait_not_clicable method for
ControlBase
and inherit classes
Tests
- Testcase for
nav_base
method ele_wait_clicable - Testcase for
nav_base
method ele_wait_not_clicable - Testcase for
control_base
method wait_clicable - Testcase for
control_base
method wait_not_clicable
Notes
- Selenium original expection class : https://github.com/SeleniumHQ/selenium/blob/11c25d75bd7ed22e6172d6a2a795a1d195fb0875/py/selenium/webdriver/support/expected_conditions.py#L290-L301
class element_to_be_clickable(object):
""" An Expectation for checking an element is visible and enabled such that
you can click it."""
def __init__(self, locator):
self.locator = locator
def __call__(self, driver):
element = visibility_of_element_located(self.locator)(driver)
if element and element.is_enabled():
return element
else:
return False
For this HTML structure , elements always will be visible but not clicable.
<span style="opacity: 0.3">
<button id="ember1771" data-container="body" data-trigger="hover" data-html="false" data-original-title="" class="ember-view confirm-btn"></button>
</span>