GCuser99 / SeleniumVBA

A comprehensive Selenium wrapper for browser automation developed for MS Office VBA running in Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option Base 1 or 0?

GCuser99 opened this issue · comments

commented

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?

commented

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.