selenium遇到不可编辑input和隐藏input如何赋值
js = 'document.getElementsByName("m:csr_mt_gnccspjclfbxd:bmshldID")[0].type="text";'
browser.execute_script(js)
js='document.getElementsByName("m:csr_mt_gnccspjclfbxd:bmshldID")[0].setAttribute("class","");'
browser.execute_script(js)
browser.find_element_by_xpath("//input[@name='m:csr_mt_gnccspjclfbxd:bmshldID']").send_keys("10500032626")
js='document.getElementsByName("m:csr_mt_gnccspjclfbxd:bmshld")[0].removeAttribute("readOnly");'
browser.execute_script(js)
思路就是先改变属性,然后赋值