Paste a string into the Web Browser component

I would like to make a button component copy a string from one component and paste it into a form in the Web Browser component. I used another post to figure out how to copy the string to the clipboard, but I cannot figure out how to paste it into the browser.

If I cannot do this with a single button click (since it might not be able to figure out where in the webpage to paste it) then I would like to be able to open a context menu with a Paste option when the user right-clicks in the web browser. My web browser component does not have any mouseClicked event handlers. It does put the following text into the console when I right-click though, I just don’t know how to handle it.

10:30:14 INFO: READ: OnShowContextMenuMessage{type=OnShowContextMenu, uid=1797, mediaType=0, x=93, y=492, linkURL='', linkText='', srcURL='', isImageBlocked=false, pageURL='https://www.gs1.org/check-digit-calculator', keywordURL='', frameURL='', frameId=-1, frameContentState='', mediaFlags=0, selectionText='', misspelledWord='', frameCharset='UTF-8'}, SocketInfo{channelId=1, browserId=0, channelType=Browser}

We are on Ignition 7.8.4 with Web Browser module 2.8.4. Please let me know if I can offer more information.

My first recommendation is to upgrade to the latest version of Ignition - anything 7.9.2 or later will be on a dramatically newer version of JxBrowser, the third party library we built into the Web Browser component.

Then, I would suggest starting with the examples on this page:
https://jxbrowser.support.teamdev.com/support/solutions

Notably, there’s some example Java code here to directly update an element of the web browser. The Java methods/examples used can be called directly from Ignition’s scripting, it’ll just take some work to ‘reverse-engineer’ the code to Python syntax.

Thank you, PGriffith. In case we don’t upgrade, does anyone have tips for bringing up a popup menu on right-click in the web browser?