You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,
thanks once again for all the help.
I have replaced old seleniumvba 2.0.9 lib with this library and it works well.
In word, Option.cls had to be renamed as there is a default option class in word.
I also made a few changes to better control visibility and logging and to mantain compatibilty with old library.
Public Sub Edge(Optional ByVal driverPath As String = "msedgedriver.exe", _
Optional ByVal port As Integer = 9516, Optional ByVal LoggingEnable As Boolean = True, _
Optional vbStyle As VbAppWinStyle = vbHide)
Dim cmdLaunch As String
Public Function FindElement(ByVal by_strategy As By, _
ByVal target As String) As WebElement
Dim urlParameters As New Dictionary, _
requestBody As New Dictionary, _
responseBody As Dictionary
urlParameters.Add "{session id}", Capabilities("sessionId")
Set requestBody = SelectLocationStrategies(by_strategy, target)
Set responseBody = SendCommand2Webdriver(W3C_FIND_ELEMENT, urlParameters, requestBody)
If responseBody Is Nothing Then
Set FindElement = Nothing
Else
Set FindElement = Convert2WebElement(responseBody("value"))
End If
End Function
the below is in "SendCommand2Webdriver" function
If xmlHttp.Status = 200 Then
Set SendCommand2Webdriver = JsonConverter.ParseJson(xmlHttp.responseText)
Else
If m_SaveLog Then
Log4Driver xmlHttp.responseText
Err.Raise vbObjectError + 513, "WebDriver", xmlHttp.responseText
Else
Set SendCommand2Webdriver = Nothing
End If
End If
Instead of raising Error, it will return nothing as return object like the original lib.
Thanks once again for a great wrapper..
Shaju
The text was updated successfully, but these errors were encountered:
I have renamed Option.cls to WebDriverOptions.cls and introduced a new parameter LogFile in WebDriverOptions.cls for the user can specify the log file output path, leave it empty the log file will not be generated. Thank you for the improvements.
hi,
thanks once again for all the help.
I have replaced old seleniumvba 2.0.9 lib with this library and it works well.
In word, Option.cls had to be renamed as there is a default option class in word.
I also made a few changes to better control visibility and logging and to mantain compatibilty with old library.
Public Sub Edge(Optional ByVal driverPath As String = "msedgedriver.exe", _
Optional ByVal port As Integer = 9516, Optional ByVal LoggingEnable As Boolean = True, _
Optional vbStyle As VbAppWinStyle = vbHide)
Dim cmdLaunch As String
End Sub
Public Function FindElement(ByVal by_strategy As By, _
ByVal target As String) As WebElement
Dim urlParameters As New Dictionary, _
requestBody As New Dictionary, _
responseBody As Dictionary
End Function
the below is in "SendCommand2Webdriver" function
If xmlHttp.Status = 200 Then
Set SendCommand2Webdriver = JsonConverter.ParseJson(xmlHttp.responseText)
Else
If m_SaveLog Then
Log4Driver xmlHttp.responseText
Err.Raise vbObjectError + 513, "WebDriver", xmlHttp.responseText
Else
Set SendCommand2Webdriver = Nothing
End If
End If
Instead of raising Error, it will return nothing as return object like the original lib.
Thanks once again for a great wrapper..
Shaju
The text was updated successfully, but these errors were encountered: