Basically, you'll have to write (or clone from Chromium) a new browser that lets you interact with the elements. You can embed a web browser in applications in some languages (.NET allows it pretty easily) but without access to the internals of the browser code that's not going to help you.
Is this a job I'd take on? No. It'd take too long, and be too frustrating I suspect.
[edit]
As an update, I found this:
The Chromium browser codebase contains about 35 million source lines of code.
You're probably going to have to understand maybe half of that ... big job! :D
[/edit]