uezo / TinySeleniumVBA

A tiny Selenium wrapper written in pure VBA
MIT License
60 stars 16 forks source link

Add Method. Clear #33

Open ghost opened 2 years ago

ghost commented 2 years ago

Clear value to element.

TinySeleniumVBA WebDriver.cls

' Clear value to element        '2021/7/4 add ishi
Public Sub Clear(ElementId As String, _
                 Optional ByVal sessionId As String = vbNullString)
    Dim Data As New Dictionary
    If sessionId <> vbNullString Then
        Data.Add "sessionId", sessionId
    End If
    Data.Add "id", ElementId
    Data.Add "text", vbNullString
    Data.Add "value", vbNullString

    Execute CMD_CLEAR_ELEMENT, Data
End Sub

TinySeleniumVBA WebElement.cls

' Clear value to element            '2021/7/4 add ishi
Public Sub Clear()
    Driver_.Clear ElementId_, SessionId_
End Sub