I've written up a tutorial here which takes you through the steps of automatically logging in to captive portal wifi. This method requires that you have a valid way to log in to the WiFi - We're not hacking, just automating.
Basically, you use a text-based browser - lynx - with a command arguments script of the commands necessary to log in. Another perk of this method is that it doesn't need the mouse, so it works in the background. Once you set it up for a particular wifi, it will automatically log you in to that wifi without getting in your way even for a few seconds.
I hope this helps.
How To Set Up Automatic WiFi Captive Portal Login
Anyone knows how to login automatically on captive portals on windows 10?
I mean those pages that appears when you connect to some public wifi and it asks to login

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic