Icon

Selenium_​Edit_​readonly_​inputs_​42487

Write in an HTML input field which is marked as readonly:

A JavaScript snippet removes the readonly attribute from the field, so that one can enter text.

Simply “writing” into a readonly text input will not work The JavaScript code removes the readonly attribute, then we can edit the input Node 1Node 2Node 3Node 4Node 5Node 6Node 7Node 8Node 9 Start WebDriver Navigate Find Elements Send Keys Navigate Send Keys Start WebDriver Find Elements Execute JavaScript Simply “writing” into a readonly text input will not work The JavaScript code removes the readonly attribute, then we can edit the input Node 1Node 2Node 3Node 4Node 5Node 6Node 7Node 8Node 9 Start WebDriver Navigate Find Elements Send Keys Navigate Send Keys Start WebDriver Find Elements Execute JavaScript

Nodes

Extensions

Links