I'm trying to create a script that will open a URL in a CSV file and input the same information, close the browser and open the 2nd URL inputting the same data. I
import csv
import webbrowser
file = open('mycsvfile.csv','r')
reader = csv.reader(file)
for row reader:
webbrowser.open_new(row[0])
I know this will open all the URLs in my csv file. Is there a way I can open a url, input my data. close the URL and repeat the process with the 2nd URL in the row?
webbrower. Withwebbrowseryou can only open file in browser but you can't control this browser to input data. With Selenium you can control web browser and you can input data.