-
-
Save jarib/1181958 to your computer and use it in GitHub Desktop.
IE issue of watir-webdriver
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
require "selenium-webdriver" | |
d = Selenium::WebDriver.for :ie | |
d.get("data:text/html;charset=utf-8,#{URI.encode DATA.read}") | |
d.find_element(:xpath => "//input[@value='Test Button']").click | |
d.find_element(:link_text, "Test Link").click | |
p d.find_element(:id => "log").text | |
__END__ | |
<html> | |
<head> | |
<script> | |
function log(msg) { document.getElementById('log').innerHTML += msg; }; | |
</script> | |
</head> | |
<body> | |
<input onclick="log('Button with Event was clicked');" type="button" value="Test Button"/> | |
<br> | |
<br> | |
<a href="" onclick="log('Link with Event was clicked');"> Test Link</a> | |
<p id="log"></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment