Created
January 16, 2013 14:35
-
-
Save medwards/4547510 to your computer and use it in GitHub Desktop.
Selenium is_displayed defect reproduction:
Launch the browser and page, after two seconds the 'Loading' message should be replaced by a 'Ready!' message, then:
browser.find_element_by_id('loading_status').is_displayed()
This file contains hidden or 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
<html> | |
<body> | |
<div id="ready_status" style="display: none"> | |
Ready! | |
</div> | |
<div id="loading_status" style="overflow: hidden"> | |
Loading.... | |
</div> | |
<div id="something" style="display: none"></div> | |
<script type="text/javascript"> | |
function triggerMe() { | |
document.getElementById("loading_status").style.width = 0; | |
document.getElementById("loading_status").style.height = 0; | |
document.getElementById("ready_status").style.display = 'block'; | |
} | |
window.setTimeout(triggerMe, 2000); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment