TinySeleniumVBA icon indicating copy to clipboard operation
TinySeleniumVBA copied to clipboard

Add Method. GetActiveElement

Open ghost opened this issue 4 years ago • 2 comments
trafficstars

TinySeleniumVBA WebDriver.cls に対して、GetActiveElement のメソッド追加。

' ==========================================================================
' DOM operations
' ==========================================================================


' Get Active Element            '2021/8/7 add ishi
Public Function GetActivElement(Optional ByVal sessionId As String = vbNullString) As WebElement
    Dim data As New Dictionary
    If sessionId <> vbNullString Then
        data.Add "sessionId", sessionId
    End If

   ' Return element
   Set GetActivElement = ToWebElement(Execute(CMD_W3C_GET_ACTIVE_ELEMENT, data)(ELEMENT_KEY), sessionId)
End Function

ghost avatar Aug 07 '21 03:08 ghost

suggest to change GetActivElement to GetActiveElement

GCuser99 avatar Jan 03 '22 16:01 GCuser99

ありがとうございます。 スペルミスです。GetActiveElementに変更。

Public Function GetActiveElement(Optional ByVal sessionId As String = vbNullString) As WebElement
    Dim data As New Dictionary
    If sessionId <> vbNullString Then
        data.Add "sessionId", sessionId
    End If

   ' Return element
   Set GetActivElement = ToWebElement(Execute(CMD_W3C_GET_ACTIVE_ELEMENT, data)(ELEMENT_KEY), sessionId)
End Function

ghost avatar Jan 04 '22 00:01 ghost