-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch implements Basic Input api: - Page.focus(selector) - focuses element with selector - Page.click(selector) - clicks element with selector - Page.type(text) - types text into a focused element Fixed #43.
- Loading branch information
1 parent
3d90ea3
commit d5a9165
Showing
4 changed files
with
139 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Button test</title> | ||
</head> | ||
<body> | ||
<button onclick="clicked();">Click target</button> | ||
<script> | ||
window.result = 'Was not clicked'; | ||
function clicked() { | ||
result = 'Clicked'; | ||
} | ||
</script> | ||
</body> | ||
</html> |
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,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Textarea test</title> | ||
</head> | ||
<body> | ||
<textarea></textarea> | ||
<script> | ||
window.result = ''; | ||
let textarea = document.querySelector('textarea'); | ||
textarea.addEventListener('input', () => result = textarea.value, false); | ||
</script> | ||
</body> | ||
</html> |
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