Forcing an Android tablet to connect to a wifi from PC
You didn't write anything about the Android version running on your device. Assuming it is capable of acting as OTG host (if unsure, you can find out using some OTG Checker), you could try attaching some USB keyboard (and mouse) to it in order to control input. This would allow you to not only activate WiFi and chose the network, but also to enter the credentials when needed.