Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #169 add tests to reproduce bug * #169 fix search from hidden element * #169 fix tests in error_messages_test.py
- Loading branch information
1 parent
696284e
commit 012151d
Showing
3 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
|
||
from selene import config, browser | ||
from selene.conditions import in_dom, hidden, text, size | ||
from selene.support import by | ||
from selene.support.jquery_style_selectors import s | ||
|
||
start_page = 'file://' + os.path.abspath(os.path.dirname(__file__)) + '/../resources/start_page.html' | ||
|
||
|
||
def setup_module(m): | ||
config.browser_name = "chrome" | ||
browser.open_url(start_page) | ||
s("#hidden_button").should_be(in_dom).should_be(hidden) | ||
|
||
|
||
def test_get_actual_hidden_webelement(): | ||
s("#hidden_button").get_actual_webelement() | ||
|
||
|
||
def test_find_selenium_element_from_hidden_element(): | ||
s("#hidden_button").find_element(*by.be_following_sibling()) | ||
|
||
|
||
def test_find_selenium_elements_from_hidden_element(): | ||
s("#hidden_button").find_elements(*by.be_following_sibling()) | ||
|
||
|
||
def test_find_selene_element_from_hidden_element(): | ||
s("#hidden_button").following_sibling.should_have(text("Inner Link")) | ||
|
||
|
||
def test_find_selene_collection_from_hidden_context(): | ||
s("#hidden_button").ss(by.be_following_sibling()).should_have(size(6)) |