Automate form filling in a Python browser

Question:

Hey. I'm starting to learn Python, and for one of my first projects, I want to write a script that will automatically fill out a survey for me . I am familiar with coding and I have most of the code written to solve this problem. That I am struggling to write a method that will hit button # 1 in question # 1 or press any given button. One way to understand that I can do this is by writing a script to click the tab → up → down → tab → up → down in the order needed to answer all the questions.

Here's an image of what the survey looks like (CSS was disabled for clarity). http://i.imgur.com/Tn94KFA.jpg

What is one way to write a method for pressing a radio button?


[ Disclaimer ]: I checked the following questions, but it was useless to me in my current situation:

+6
source share
1 answer

There are Python libraries and tools for automating browser actions. StackOverflow.com is not a place to request recommendations for such a tool, and thus moderators close this question (SO usually requests help for a specific problem, and not for widespread help and training requests). However, here are a few starting points for you.

To install Python packages, see the official installation tutorial .

+9
source

Source: https://habr.com/ru/post/983515/


All Articles