selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
30 lines (29 loc) • 1.15 kB
HTML
<html>
<head>
<title>Javascript Enhanced Page</title>
</head>
<body>
<form id="form1" action="javascriptEnhancedForm.html" method="post">
<p>
<label id="labelforusername" for="username">
Username: <input id="username" type="text" name="username" />
<script type="text/javascript">
document.getElementById('username').value = 'Michael';
</script>
</label>
</p>
<p>
<label for="password">
Password: <input id="password" type="password" name="password" />
<script type="text/javascript">
var z = document.getElementById('password'); setTimeout('try{z.focus();z.select();} catch(e) {}', 1);
</script>
</label>
</p>
<p>
<input type="submit" value="Submit" />
</p>
</form>
</body>
</html>