1

I have the following code

driver.find_element_by_id("Element_ID").send_keys(str(sheet.cell(row=r, column=2).value))

Values is taken from excel, but instead send_keys, I want to use document.getElementsByName script.

How can I adapt the getElementsByName script for my situation?

0

The Python WebDriver API has a method for getting elements by name:

find_element_by_name(name)

https://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.find_element_by_name

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.