Is there any way to get a small mount of browser integration from Go?

agolangf · · 707 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi all,</p> <p>I&#39;ve been looking around today and can&#39;t seem to find any info on what I&#39;m trying to do. Basically, I want to write a Go CLI script that can:</p> <p>1) open a browser to a specific URL to log in to a form</p> <p>2) listen for a specific event/URL that is hit</p> <p>3) Inspect the value of a cookie on the page when that state is hit</p> <p>Is there any tools or libraries that could help with this? Basically, I&#39;m trying to wrap a SAML integration for logging in to a VPN and pass the resulting cookie down to openconnect to set up the VPN connection.</p> <hr/>**评论:**<br/><br/>absdevops: <pre><p>Maybe something like this? <a href="https://github.com/tebeka/selenium" rel="nofollow">https://github.com/tebeka/selenium</a></p></pre>raff99: <pre><p>There are a few Chrome devtools clients available, listed here: <a href="https://github.com/ChromeDevTools/awesome-chrome-devtools#chrome-devtools-protocol" rel="nofollow">https://github.com/ChromeDevTools/awesome-chrome-devtools#chrome-devtools-protocol</a></p> <p>I am the author of <a href="https://github.com/raff/godet" rel="nofollow">https://github.com/raff/godet</a>, if you want to try it out (I have some examples that do most of what you ask, but I don&#39;t have a specific example that fills a form - I have done it before by simply running a script when the selected page becomes available)</p></pre>joncalhoun: <pre><p>It is meant for testing, but Agouti (<a href="https://agouti.org/" rel="nofollow">https://agouti.org/</a>) might meet your needs.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

707 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传