I need to remove the value
attribute from this xpath. (In this example there are two value
attributes).
I create the xpath in a string:
"xpath": "//iframe[@title=\"s='replaceable-modal-title'>Compléter mes entretiens</span><input type='hidden' id='assessDurationIdverif' value='2091' /><input type='hidden' id='employeeIdverif' value='1368' />\"]/html/body/div[2]/section/div/div[4]/div/form/div[2]/div/div[2]/div/div/textarea"
My first idea was to use the String#replace
method to replace attribute's value with an empty string:
string.replace(/value=(2091)/g,'test')
My problem is that the value
attribute does not have the same value when I refresh the page.
I just want to know how to generically replace the number by undefined character.