Reputation: 228
I have a code in applescript that automatically fills the webform and I want to wait before the page is fully loaded and then proceed with the javascript filling of the form.
Code:
tell application "Google Chrome" to tell active tab of window 1
activate
open location "http://www."
delay 10
execute javascript "document.getElementById('ctl00_ContentPlaceHolder1_personDetails_titleDropDownList').value='Mr '"
Thanks in advance
Upvotes: 0
Views: 259
Reputation: 1207
I'd add that in a script
tag that waits for the page to load. So at the bottom of the page it'd be something like:
<script>
$(document).ready(function() {
document.getElementById('ctl00_ContentPlaceHolder1_personDetails_titleDropDownList').value='Mr ';
});
</script>
Upvotes: 1