I am trying to change the value of an attribute for an element using selenium in VBA. This is the outHTML of the element
<div class="input-container"><input type="text" class="input" placeholder=" " inputmode="numeric" data-maska-value="30/05/2024"><label class="label">Start date</label><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="input__icon"><path fill-rule="evenodd" clip-rule="evenodd" d="M17 2C17 1.44771 16.5523 1 16 1C15.4477 1 15 1.44771 15 2V3H9V2C9 1.44771 8.55228 1 8 1C7.44772 1 7 1.44771 7 2V3H5C3.34315 3 2 4.34315 2 6V10V20C2 21.6569 3.34315 23 5 23H19C20.6569 23 22 21.6569 22 20V10V6C22 4.34315 20.6569 3 19 3H17V2ZM20 9V6C20 5.44772 19.5523 5 19 5H17V6C17 6.55228 16.5523 7 16 7C15.4477 7 15 6.55228 15 6V5H9V6C9 6.55228 8.55228 7 8 7C7.44772 7 7 6.55228 7 6V5H5C4.44772 5 4 5.44772 4 6V9H20ZM4 11H20V20C20 20.5523 19.5523 21 19 21H5C4.44772 21 4 20.5523 4 20V11Z" fill="#394B5A" fill-opacity="0.8"></path></svg></div>
I am trying the following but didn’t work
Dim oElement As Selenium.WebElement
Set oElement = .FindElementByXPath("//div[@class='input-container']/input[@class='input']")
Debug.Print oElement.Attribute("data-maska-value")
.ExecuteScript "arguments[0].setAttribute('data-maska-value', '" & ws.Cells(iRow, "L").Value & "');", oElement
Any idea how to change the value of the attribute data-maska-value