I would like to use Selenium to submit a form which contains several elements. For example:
driver = webdriver.Firefox()
driver.get("https://www.hackerearth.com/problems/")
#find all form input fields via form name
_inputs = driver.find_elements_by_xpath('//form[@name="signup-form"]//input')
for input in _inputs:
#print attribute name of each input element
print input.get_attribute('name')
o/p
first_name
last_name
password
submit