GCuser99 / SeleniumVBA

A comprehensive Selenium wrapper for browser automation developed for MS Office VBA running in Windows
MIT License
89 stars 18 forks source link

Option Base 1 or 0? #6

Closed GCuser99 closed 2 years ago

GCuser99 commented 2 years ago

VBA collections are indexed starting with 1 as the lower index (1-based). Arrays default to zero-based but can be 1-based if user declares as such. What should the default be for SeleniumVBA? Is there a simple way to let user have control over this?

GCuser99 commented 2 years ago

I set the default to 1-based to be consistent with VBA Collections, which are used for the WebElements and Cookies classes. However, user can revert back to 0-based easily by setting the baseArrayIdx and baseDomIdx constants of the WebDriver class to 0.