Skip to content

Commit 9874ba0

Browse files
committed
version update
Removed all support for sunsetting Edge IE mode Refactored TableToArray method of WebDriver and WebElement classes -work done on the browser side via JavaScript -much more performative for very large tables (>20x faster for VBA, 10x faster for ActiveX DLL) -eliminates MSHTML dependence (IE sunset) Refactored sanitizeHTML function of PageToHTML* methods of WebDriver class -work done on the browser side via JavaScript -behaves consistently across different Windows OS versions and Apps -eliminates MSHTML dependence (IE sunset) Refactored Scrolling functionality of Webdriver class -added GetScrollWidth method (similar to GetScrollHeight) -added complete set of scroll options to ScrollBy, ScrollTo, ScrollToTop, and ScrollToBottom methods -fixed smooth scroll in all Scroll* methods to wait until animation is complete b4 proceeding [@dornech] Added scrolling functionality to WebElement class to facilitate scrolling in elements with content overflow Added test code to illustrate the above new/improved functionality Added Top, Bottom, Left, and Right properties to WebElement/WebDriver's GetRect method's return dictionary Refactored GetInstalledDriverVersion method of WebDriverManager class to get Edge driver version from extended file properties Solved issue where Malwarebytes real-time AV was blocking use of VBScript's RexExp [vbforums] Added error handling to catch situation where Malwarebytes settings is blocking use of VBScript's RexExp [vbforums] Added comments to SeleniumVBA ini file for example imperial and metric print page settings [vbforums] More improvements to Test modules -continued to refactor testing code in order to move away from commercial websites and streamline dev testing -added file cleanup to each sub that created files Minor code cleanups -Renamed private function deObjectifyInputArgs in WebDriver class to serializeScriptInputs -Renamed private function objectifyScriptResponse in WebDriver class deserializeScriptResponse Updated Wiki help and object model for above object model additions
1 parent 1444086 commit 9874ba0

File tree

81 files changed

+2333
-2173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2333
-2173
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A comprehensive Selenium wrapper for browser automation developed for MS Office
44

55
## Features
66

7-
- Edge, Chrome, Firefox, and IE Mode browser automation support
7+
- Edge, Chrome, and Firefox browser automation support
88
- MS Excel Add-in, MS Access DB, and [twinBASIC](https://twinbasic.com/preview.html) ActiveX DLL solutions available
99
- A superset of Selenium's [W3C WebDriver](https://w3c.github.io/webdriver/) commands - [over 400 public methods and properties](https://github.com/GCuser99/SeleniumVBA/wiki/Object-Model-Overview)
1010
- Support for HTML DOM, Action Chains, SendKeys, Shadow Roots, Cookies, ExecuteScript, CDP, and Capabilities

dist/SeleniumVBA.accdb

-12 KB
Binary file not shown.

dist/SeleniumVBA.ini

728 Bytes
Binary file not shown.

dist/SeleniumVBA.xlsm

-4.1 KB
Binary file not shown.

dist/SeleniumVBADLLSetup.exe

-2.43 KB
Binary file not shown.

src/VBA/ClassFactory.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Attribute VB_Description = "This class is used for object instantiation when ref
33
'@ModuleDescription "This class is used for object instantiation when referencing SeleniumVBA externally from another code project"
44
'@folder("SeleniumVBA.Source")
55
' ==========================================================================
6-
' SeleniumVBA v5.8
6+
' SeleniumVBA v5.9
77
'
88
' A Selenium wrapper for browser automation developed for MS Office VBA
99
'

src/VBA/WebActionChain.cls

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Attribute VB_Description = "This class is used to emulate a human interaction se
1212
'@Exposed
1313
'@folder("SeleniumVBA.Source")
1414
' ==========================================================================
15-
' SeleniumVBA v5.8
15+
' SeleniumVBA v5.9
1616
'
1717
' A Selenium wrapper for browser automation developed for MS Office VBA
1818
'
@@ -949,21 +949,8 @@ Attribute Perform.VB_Description = "Executes the action chain"
949949
'in which the inputs were added, making multi-calls to tCMD.CMD_ACTIONS.
950950

951951
If data_.Exists("actions") Then
952-
'Note IEdriverServer does not support wheel actions, so must use multi-call method
953-
If driver_.GetBrowserName = "internet explorer" Then
954-
Dim inputChans() As Variant
955-
Dim i As Long
956-
'multi-call method:
957-
inputChans = data_.Item("actions")
958-
For i = 0 To UBound(inputChans)
959-
data_.Item("actions") = Array(inputChans(i))
960-
driver_.execute tCMD.CMD_ACTIONS, data_
961-
Next i
962-
Else
963-
'... or synchronize input channels and call Execute method once
964-
'for typical action chains, this is 5-10% faster...
965-
driver_.execute tCMD.CMD_ACTIONS, syncChannels(data_)
966-
End If
952+
'synchronize input channels and call Execute method once
953+
driver_.execute tCMD.CMD_ACTIONS, syncChannels(data_)
967954
End If
968955
End Sub
969956

src/VBA/WebAlert.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Attribute VB_Description = "This class is used to manage browser alerts - must b
1212
'@Exposed
1313
'@folder("SeleniumVBA.Source")
1414
' ==========================================================================
15-
' SeleniumVBA v5.8
15+
' SeleniumVBA v5.9
1616
'
1717
' A Selenium wrapper for browser automation developed for MS Office VBA
1818
'

src/VBA/WebCapabilities.cls

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Attribute VB_Description = "This class is used to manage/set Selenium optional C
1212
'@Exposed
1313
'@folder("SeleniumVBA.Source")
1414
' ==========================================================================
15-
' SeleniumVBA v5.8
15+
' SeleniumVBA v5.9
1616
'
1717
' A Selenium wrapper for browser automation developed for MS Office VBA
1818
'
@@ -203,8 +203,6 @@ Attribute AddExtensions.VB_Description = "Adds a list of option extensions"
203203
addToOptionList "extensions", extList
204204
Case svbaBrowser.Firefox
205205
Err.Raise 1, "WebCapabilities", "The AddExtensions method is not supported by the Firefox browser - use InstallAddon method of Webdriver class instead"
206-
Case svbaBrowser.IE
207-
Err.Raise 1, "WebCapabilities", "The AddExtensions method is not supported by the IE browser."
208206
End Select
209207
End Sub
210208

@@ -227,8 +225,6 @@ Attribute RemoveControlNotification.VB_Description = "Removes control notificati
227225
'to get rid of that, run in incognito mode
228226
Case svbaBrowser.Firefox
229227
Err.Raise 1, "WebCapabilities", "The RemoveControlNotification method is not supported by the Firefox browser."
230-
Case svbaBrowser.IE
231-
Err.Raise 1, "WebCapabilities", "The RemoveControlNotification method is not supported by the IE browser."
232228
End Select
233229
End Sub
234230

@@ -243,8 +239,6 @@ Attribute SetDetachBrowser.VB_Description = "Sets the detach option for Edge/Chr
243239
Me.SetOption "detach", val
244240
Case svbaBrowser.Firefox
245241
Err.Raise 1, "WebCapabilities", "The SetDetachBrowser method is not supported by the Firefox browser."
246-
Case svbaBrowser.IE
247-
Err.Raise 1, "WebCapabilities", "The SetDetachBrowser method is not supported by the IE browser."
248242
End Select
249243
End Sub
250244

@@ -256,8 +250,6 @@ Attribute SetDebuggerAddress.VB_Description = "Sets the Debugger Address option
256250
Me.SetOption "debuggerAddress", val
257251
Case svbaBrowser.Firefox
258252
Err.Raise 1, "WebCapabilities", "The SetDebuggerAddress method is not supported by the Firefox browser."
259-
Case svbaBrowser.IE
260-
Err.Raise 1, "WebCapabilities", "The SetDebuggerAddress method is not supported by the IE browser."
261253
End Select
262254
End Sub
263255

@@ -337,8 +329,6 @@ Attribute RunInvisible.VB_Description = "Runs headless argument mode"
337329
Me.AddArguments "--headless=new"
338330
Case svbaBrowser.Firefox
339331
Me.AddArguments "--headless"
340-
Case svbaBrowser.IE
341-
Err.Raise 1, "WebCapabilities", "The RunInvisible method is not supported by the IE browser."
342332
End Select
343333
End Sub
344334

@@ -352,17 +342,6 @@ Attribute RunIncognito.VB_Description = "Runs incognito/private argument mode"
352342
Me.AddArguments "--inprivate"
353343
Case svbaBrowser.Firefox
354344
Me.AddArguments "-private"
355-
Case svbaBrowser.IE
356-
'see https://www.selenium.dev/documentation/ie_driver_server/
357-
'for this to work, the following register key value must be set:
358-
'Key: "Computer\HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main"
359-
'Value "TabProcGrowth" set to REG_DWORD = 0
360-
'WARNING - setting the above key value to 0 will slow sendkeys (similar to 64-bit driver problem)
361-
'Me.SetOption "ie.forceCreateProcessApi", True
362-
'Me.SetOption "ie.browserCommandLineSwitches", "-private"
363-
'Me.SetOption "ie.ensureCleanSession", True
364-
'the above did not work for GCUser99
365-
Err.Raise 1, "WebCapabilities", "The RunIncognito method is not supported by the IE browser."
366345
End Select
367346
End Sub
368347

@@ -379,7 +358,7 @@ Attribute SetProfile.VB_Description = "Sets a user-defined profile path"
379358
profilePath = driver_.ResolvePath(profilePath)
380359

381360
Select Case browser_
382-
Case svbaBrowser.Chrome, svbaBrowser.Edge, svbaBrowser.IE
361+
Case svbaBrowser.Chrome, svbaBrowser.Edge
383362
userDir = fso.GetParentFolderName(profilePath)
384363
profileName = fso.GetBaseName(profilePath)
385364
Me.AddArguments "--user-data-dir=" & userDir
@@ -396,7 +375,7 @@ End Sub
396375
Public Sub SetUserAgent(ByVal val As String)
397376
Attribute SetUserAgent.VB_Description = "Sets the user agent string"
398377
Select Case browser_
399-
Case svbaBrowser.Chrome, svbaBrowser.Edge, svbaBrowser.IE
378+
Case svbaBrowser.Chrome, svbaBrowser.Edge
400379
Me.AddArguments "--user-agent=" & val
401380
Case svbaBrowser.Firefox
402381
Me.SetPreference "general.useragent.override", val
@@ -465,8 +444,6 @@ Attribute SetDownloadPrefs.VB_Description = "Sets auto-download preferences and
465444
'Me.SetPreference "browser.helperApps.neverAsk.saveToDisk", "application/pdf;text/plain;text/csv;application/text;text/xml;application/xml;application/csv;pplication/octet-stream doc xls pdf txt"
466445
'Me.SetPreference "browser.download.useDownloadDir", True
467446
'Me.SetPreference "browser.download.viewableInternally.enabledTypes", ""
468-
Case svbaBrowser.IE
469-
Err.Raise 1, "WebCapabilities", "The SetDownloadPrefs method is not supported by the IE browser."
470447
End Select
471448
End Sub
472449

@@ -483,8 +460,6 @@ Attribute SetGeolocationAware.VB_Description = "Sets whether or not to allow geo
483460
'Me.SetPreference "profile.default_content_setting_values.geolocation", IIf(aware, 1, 2)
484461
Case svbaBrowser.Firefox
485462
Err.Raise 1, "WebCapabilities", "The SetGeolocationAware method is not supported by the Firefox browser."
486-
Case svbaBrowser.IE
487-
Err.Raise 1, "WebCapabilities", "The SetGeolocationAware method is not supported by the IE browser."
488463
End Select
489464
End Sub
490465

@@ -553,8 +528,6 @@ Friend Sub initializeFor(ByVal browser As svbaBrowser)
553528
browserOptionKey = "ms:edgeOptions"
554529
Case svbaBrowser.Firefox
555530
browserOptionKey = "moz:firefoxOptions"
556-
Case svbaBrowser.IE
557-
browserOptionKey = "se:ieOptions"
558531
End Select
559532

560533
data_.Item("alwaysMatch").Add browserOptionKey, browserOptions

src/VBA/WebCookie.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Attribute VB_Description = "This class is used to manage/modify a cookie object"
1212
'@Exposed
1313
'@folder("SeleniumVBA.Source")
1414
' ==========================================================================
15-
' SeleniumVBA v5.8
15+
' SeleniumVBA v5.9
1616
'
1717
' A Selenium wrapper for browser automation developed for MS Office VBA
1818
'

0 commit comments

Comments
 (0)