Reputation: 336
I have looked across everywhere to find answers but could not get it, so would like your help in guiding me. Selenium Basic (Excel VBA ) is giving me syntax error at the time of compilation. My Objective is to move the mouse to a known element.
Here are the codes
Dim driver As New WebDriver
Dim actions As Selenium.actions
driver.Start "chrome", "http://anywebsite.com"
driver.get "/"
WebElement we = driver.FindElementByClass("MyClassName")
actions.MoveToElement (we)
It gives me an error at the compilation level as and FindElementByClass is highlighted. However in the watch window I can see values against it.
Compile Error: Sub or Function Not Defined
Would request if you can guide me since in the watch
Upvotes: 1
Views: 3877
Reputation: 26
Change
driver.actions.MoveToElement(we)
to
driver.actions.MoveToElement(we).perform
Upvotes: 1