I have written to automate some work using selenium and python. The code uses a for-loop and gets its input from an excel spreadsheet and steps through the different screens of the web application and after the steps are complete goes to the next line in spreadsheet and so on and so forth. The issue I'm encountering is that the code skips through a few rows of the spreadsheet at a time randomly. How can I stop this from happening? Thanks. Below is my code.
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver import ActionChains
import pdb
from itertools import islice
file_path = "file.xlsx"
driver = webdriver.Chrome(executable_path = "chromedriver.exe")
driver.get("url")
pdb.set_trace()
for index, row in islice(df.iterrows(), 0, None) :
driver.get("url")
driver.implicitly_wait(60)
driver.find_element_by_id("xyz").send_keys("abc")
.
.
.
driver.find_element_by_name("Submit").click()