移至Seleniumbasic中的元素语法-Excel VBA [英] Move to Element Syntax in Seleniumbasic - Excel VBA
本文介绍了移至Seleniumbasic中的元素语法-Excel VBA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我到处寻找答案,但是找不到答案,所以希望您能帮助我.Selenium Basic(Excel VBA)在编译时给我语法错误.我的目标是将鼠标移至已知元素.
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.
这是密码
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)
它在编译级别给我一个错误,并且FindElementByClass被突出显示.但是,在监视窗口中,我可以看到针对它的值.
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
推荐答案
更改
driver.actions.MoveToElement(we)
到
driver.actions.MoveToElement(we).perform
这篇关于移至Seleniumbasic中的元素语法-Excel VBA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文