In the title of the question is a console application. But, I can assume the text
In this field, you need to send some value, click on the button, then get a new page, where to go on the first link.
Perhaps you will suit the emulation of user actions in the browser. About browser emulation:
Very accurate emulation of user actions is done by writing your own browser extension (Firefox / GoogleChrome for example) - not to distinguish from this user. A plugin can completely take over control - for example, open a tab with a specific site, and "grab" it.
Inside the plugin, a certain entity is developed that can emulate movement and mouse clicks from object to object: objects themselves from another site are selected, for example, by simple jQuery - just like in the code of any site. Entities also need to add the ability to emulate text input in any field.
Emulation can occur by sending a trusted DOM event (it can do the plug-in code), or you can directly use WinApi and its PostMessageW (at least firefox add-ons can connect any dll and then use it from JS) —the reinforced concrete method. In general, technically, such an emulator cannot be distinguished from the user.
Under similar activity the known Greasemonkey addon is ground . But if the scale of the emulation is planned large (the policy of adding certain scripts to certain pages is not enough), I would not recommend it, because its logic is not enough.
If you want to add emulation and browser control from the console, use selenium. It does not work if you want it to work from a standard server - that is, without a GUI. But in my practice I will say - they used emulators often, for them we had separate servers with Windows, with GUI. Without a GUI, with a bare console, there is an opinion that it will not work to emulate quality ..
The classic use of such emulators is bots-parsers, bots-spammers, bots-gaming, auto-testing your own site.
headless browsers- Herrgott