开发者

HTMLUnit click() on HtmlElement does not work

开发者 https://www.devze.com 2022-12-31 04:53 出处:网络
I\'m trying to get HTMLUnit to perform a click action on a span, which doesn\'t work for some reason. Please take a peek at the code below.

I'm trying to get HTMLUnit to perform a click action on a span, which doesn't work for some reason. Please take a peek at the code below.

HtmlElement clickable = (HtmlElement) page.getByXPath("//div[10]/div/div/span").get(0);
clickable.click();

By doing this I get a really long error message. The interesting bit seems to be the following:

TypeError: Cannot find function setCapture in object [object].(script in [some long url here])

The same thing happens when i try to call on mouseDown() or dblClick() or any other mousey method. This is really frustrating since the code snippet i开发者_JAVA百科s something that worked fine some time ago. I simply uncommented it today and now it won't co-operate.


HtmlUnit doesn't currently support .setCapture()/.releaseCapture(), please open a bug report in its tracker

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号