2016-12-08 20:07
浏览 260

Golang中的JavaScript onClick事件

In an attempt to automate some web/browser tasks with golang I reached a barrier when if comes comes to click, touch and swipe interaction.

Thanks to the amazing https://github.com/PuerkitoBio/goquery library I am able to parse webpages and I am able to interact with form sheets.

One integral part that is missing to automate pates is simulating mouse clicks that trigger javascript.

How would it be possible to implement this in golang? Do I need to simulate OS level mouse clicks or do browsers have an API that I can use?

图片转代码服务由CSDN问答提供 功能建议

在尝试使用golang自动执行某些网络/浏览器任务时,如果点击,我碰到了障碍 并滑动互动。

感谢令人惊奇的 https://github.com/PuerkitoBio/goquery 库我能够解析网页,并且能够与表单交互。


如何在golang中实现这一点? 我需要模拟操作系统级别的鼠标单击还是浏览器具有我可以使用的API?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doutan1970 2016-12-08 20:28

    You would need to use something like Selenium's WebDriver which has at least one go client

    解决 无用
    打赏 举报

相关推荐 更多相似问题