This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I am using python, with Selenium and Openpyxl to do a script that performs the following:
1) It reads data from an excel datasheet.
2) It uses the data from the sheet to automatically fill a form on a website.
The script seems to be working fine under normal circumstances, but the if there is missing data on one of the fields it reads from the excel, or if for example one of the data it reads is not in one of the dropdowns options of the page it will fail.
What I want to do is to modify the script so, if it detects an error of that type, it logs the error on a separate file, skip the faulty row and continue with the rest and throws a warning at the end, but I have no idea how to do this, as I don't know how to read error messages from the python.
Any advance would be appreciated.
Bonus question for people with more experience
1) The webform is on a private network that I have only access for testing once a month.
2) Is there any way to save an offline version of it only for testing, if doable, what precautions or what should I modify on the html code of the site?
Subreddit
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/AskPython/c...