Python Mechanize: Web Forms with Javascript -


i trying upload information through form using python. share form password protected (i have permission access though). have been using mechanize have encountered problem.

the page uploading consists of number of forms, accessed tabs @ top of page. these tabs set using javascript. when access url of page, can see form first tab using mechanize, not know how change tabs.

this snippet got firebug:

<form id="frmentityedit" enctype="multipart/form-data" onsubmit="javascript:return  webform_onsubmit();" action="entityeditproducts.aspx? entityfilterid=239&entityname=category&iden=6751" method="post" name="frmentityedit"> 

also, when change tabs, value "tabstrip1_selectednode" cycles through "p0", "p1", "p2", etc.

<input id="tabstrip1_data" type="hidden" name="tabstrip1_data"> <input id="tabstrip1_properties" type="hidden" name="tabstrip1_properties"> <input id="tabstrip1_selectednode" type="hidden" value="p0" name="tabstrip1_selectednode"> <input id="tabstrip1_scrolldata" type="hidden" value="0" name="tabstrip1_scrolldata"> 

i able switch tabs, can fill out forms.

thanks in advance help. let me know if need more information.

mechanize doesn't evaluate javascript. easiest way i've seen using selenium, open browser on computer , communicate python.

i answered similar question here.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -