Skip to content

sdkn104/VBA-Selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VBA-Selenium

VBA API for Selenium WebDriver

Example

Dim driver As New SeleniumDriver
Dim e As SeleniumElement

driver.Setup("C:\path\to\chromedriver.exe", "chrome")
driver.GetUrl("http://www.example.com")
Set e = driver.FindElementById("id1")
e.Click
Debug.Print e.Text

API List

Class SeleniumDriver

Public Function Setup(Optional ByRef driverPath As String = "", Optional browser As String = "chrome") As String
Public Function Status() As Boolean
Public Function GetUrl(ByRef url As String) As String
Public Function FindElement(ByRef by As String, ByRef value As String) As SeleniumElement
Public Function FindElementByXpath(ByRef xpath As String) As SeleniumElement
Public Function FindElementByName(ByRef name As String) As SeleniumElement
Public Function FindElementById(ByRef id As String) As SeleniumElement
Public Function FindElementByClassName(ByRef className As String) As SeleniumElement
Public Function FindElementByTagName(ByRef TagName As String) As SeleniumElement
Public Function FindElements(ByRef by As String, ByRef value As String) As Variant
Public Function PageSource() As String

Class SeleniumElement

Public Function FindElement(ByRef by As String, ByRef value As String) As SeleniumElement
Public Function FindElementByXpath(ByRef xpath As String) As SeleniumElement
Public Function FindElementById(ByRef id As String) As SeleniumElement
Public Function FindElementByName(ByRef name As String) As SeleniumElement
Public Function FindElementByClassName(ByRef className As String) As SeleniumElement
Public Function FindElementByTagName(ByRef TagName As String) As SeleniumElement
Public Function FindElements(ByRef by As String, ByRef value As String) As Variant
Public Function SendKeys(ByRef keys As String) As String
Public Function Submit() As String
Public Function Click() As String
Public Function Clear() As String
Public Function GetAttribute(ByRef attributeName As String) As Variant
Public Function Text() As String
Public Function TagName() As String
Public Function ToArray() As Variant

Tested

Reference

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published