'CSV-> webform Selenium automation quits chrome

I am working to auto fill a webform from a CSV using selenium and python.

Whenever it finishes the first row of values, a second instance of chrome opens and then all of chrome closes before entering the second row's values or even initializing the webpage. No crash reports are being generated.

This only happens when I am using a CSV import, if I just do click/sendkeys args it works fine.

CSV code:

with open('test.csv', 'r') as csv_file:

    csv_reader = csv.reader(csv_file)

    for line in csv_reader:

        time.sleep(5)

        web = webdriver.Chrome(PATH,options=CH_Option)
        web.get(url)

        time.sleep(1)




Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source