I've been trying to select the 2nd form out of 20+ forms in a page. And it happens to be the only form in the page with a name 'send_form'.
I've tried
and
and
The first results in every single form object from the page. The second returns a no form by that name error. And the third also returns every single form object on the page.
Now there are three fields I'm trying to access name=prospect_e mail[], name=prospect_n ame[], name=prospect_t elephone[]. Now these input fields also have id's with the same name lacking the []. Now I've successfully input data into fields on other forms so I know how to do it. But when I try to access these I get an error saying the name of ... does not exist. I was figuring it's probably because I don't have the right form selected. I've spent hours on this and I'm racking my brain trying to figure it out. Help will be appreciated.
I've tried
Code:
br.select_form(nr=1)
Code:
br.select_form(name='send_form')
Code:
for f in br.forms():
if f.name != None:
br.select_form(name=f.name)
Now there are three fields I'm trying to access name=prospect_e mail[], name=prospect_n ame[], name=prospect_t elephone[]. Now these input fields also have id's with the same name lacking the []. Now I've successfully input data into fields on other forms so I know how to do it. But when I try to access these I get an error saying the name of ... does not exist. I was figuring it's probably because I don't have the right form selected. I've spent hours on this and I'm racking my brain trying to figure it out. Help will be appreciated.
Comment