XFawkes Posted January 10, 2017 Share Posted January 10, 2017 Is there any way I can put a text in a browser textfield that is not hosted on localhost? I know that I could inject mouse down on a textfield and user can type on his own a text string using his keyboard. The point is to do it from the code. Something like: injectBrowserMouseDown injectBrowserMouseUp injectBrowserTextInput("abcdefg") I wanted to use JS to get element by id and update innerText, but executeJavaScript does not with remote addresses. Link to comment
dugasz1 Posted January 12, 2017 Share Posted January 12, 2017 As far as i know (i looked it up now too) you can't simulate character click with script. (You can only move the cursor) The only way to do it is by JS but you can't do it as you mentioned because it is disabled for safty reasons i guess. Link to comment
idarrr Posted January 16, 2017 Share Posted January 16, 2017 (edited) Something like this? local text = "text here" local code = 'document.getElementById("text").value = '..text..';' executeBrowserJavascript(theBrowser, code) Edited January 16, 2017 by idarrr Typo Link to comment
Bonsai Posted January 16, 2017 Share Posted January 16, 2017 Do you have control over the remote website? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now