0
sheet1 = client.open_by_url("https://docs.googlesheet")-- using google sheet here

sh = sheet1.worksheet("Sheet1")

dera = gd.get_as_dataframe(sh1,evaluate_formulas = True,skiprows = 0,has_header = True)

del = dera[['id']].dropna()

z = del2['names'].values.tolist()

driver.get("https://google.com/") -- using google.com as example

time.sleep(5)

driver.refresh()

time.sleep(2)

name_button = driver.find_element_by_xpath("//button[text()='NAMES']")

name_button.click()

time.sleep(2)

driver.find_element_by_xpath("//button[text()='Manual']")

time.sleep(2)

driver.find_element_by_xpath("//div[text()='Maximum 5000 Names'] 
/..//textarea").send_keys(z)

time.sleep(2)

Not able to pass the defined 430 rows of 'z' into send keys.

Could someone please help me with this.?

Changed the names of sheet and google chrome due to privacy issues.

0

You should try looping over the list you created. z is a list, and when you don't loop over the list it tries to run only once.

for value in z:
    driver.find_element_by_xpath("//div[text()='Maximum 5000 Names']/..//textarea").send_keys(value)

time.sleep(2)
  • 1
    Thanks for the response. I have converted the list to string. In order to pass the values to the send-keys. It's working now. – naveen babu dadla Oct 18 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.