Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple submit.. #66

Open
yuniesky1986 opened this issue Oct 3, 2016 · 1 comment
Open

Multiple submit.. #66

yuniesky1986 opened this issue Oct 3, 2016 · 1 comment

Comments

@yuniesky1986
Copy link

Hello, I tell that I am using my Odoo robobrowse to connect with an external platform approving products that can be sold on the market. This platform has a form with a button that lets you fill a table with the products to be registered and after filling submit other data is a general button. In sistesis, the problem is given with the button that fills the table, because this is the format:

When I do:
browser = RoboBrowser (history = True)
browser.open ( 'https: //....../')
form = browser.get_form (action = '/ ....')
The form object contains all fields including the field where I enter the product name, but the application form:
browser.submit_form (form)
all form fields unless the product, which only applies when I click the Add Product button is recorded ..
The submit_fields property of the form is an empty list, so I can not use the option:
browser.submit_form (form, submit = submit) ..
Any proposal???

@JoabMendes
Copy link

Have you tried to fill the fields before submitting the form?
Like:

signup_form['field_name'].value = 'field_value'

# Submit the form
browser.submit_form(signup_form)

I believe the Add Product button works with a JavaScript call so it won't with robobrowser.
So it's better you edit the form fields manually before submitting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants