Control browser from shell script

I have a browser running in a separate virtual terminal and would like to be able to send shortcut codes (e.g. ctrl+A) to the browser (and have it react) from a bash script in a separate virtual terminal. I need to keep the script in the separate virtual terminal.

not clear. what do you need control?

I need to send Ctrl+A (select all) and Ctrl+C (copy) from a bash script to a browser running in a separate workspace on the same computer workstation. That is so the text created by the browser will be captured on the clipboard so that I can put it into a file for processing in the workspace used by the bash script. Use of wget does not produce a page containing the text I require so that option is off the table.