def set_input_value ( self , selector , value ) : script = 'document.querySelector("%s").setAttribute("value", "%s")' script = script % ( selector , value ) self . evaluate ( script )
webdriver python element input set value
Set the value of the input matched by given selector .
def set_input_value(self, selector, value):
        """Set the value of the input matched by given selector."""
        script = 'document.querySelector("%s").setAttribute("value", "%s")'
        script = script % (selector, value)
        self.evaluate(script)