WebScraping in Excel using Selenium - problem with readonly attributes

92 views Asked by At

I would like to remove the readonly attribute in a website. I can only use Excel VBA with Selenium in order to do this.

The code in the webpage is the following:

<input type="text" name="fchFin" id="fchFin" readonly="" value="2023-05-26" maxlength="10" size="10" onblur="validarFecha(this);">
1

There are 1 answers

0
igittr On BEST ANSWER

try this

Dim iput As WebElement, rO As Boolean
Set iput = driver.FindElementByXPath("//*[@name='someName']")
driver.ExecuteScript "arguments[0].removeAttribute('readonly')", iput 
rO = iput.Attribute("readonly")`