10 ms·
Any way of scripting this to automate button clicks etc? I use PhantomJS for this now but found it to be incredibly unstable for complex pages.
by ctphipps 9y ago
Any way of scripting this to automate button clicks etc? I use PhantomJS for this now but found it to be incredibly unstable for complex pages.
- bcherny 9y agoYou can use ChromeDriver, the same as you would for headed Chrome.
- vvoyer 9y agoYes: https://github.com/cyrus-and/chrome-remote-interface/wiki/Trigger-synthetic-click-events https://github.com/cyrus-and/chrome-remote-interface/wiki/Tr... But ultimately selenium and webdriver.io will do a better job at this
- sandstrom 9y agoThere is an excellent library called nightmare (based on electron). If you need print-screens you can use xvfb or wait for this issue: https://github.com/segmentio/nightmare/issues/224 https://github.com/segmentio/nightmare/issues/224
- symtos 9y agoit should be noted that nightmare isn't safe for untrusted websites: https://github.com/segmentio/nightmare/issues/1060 https://github.com/segmentio/nightmare/issues/1060
- kenshaw 9y agoIf you're using Go, you might want to check out https://github.com/knq/chromedp https://github.com/knq/chromedp ... There is also a similar package for NodeJS. Otherwise, you can use Selenium in other languages.
- RandomBookmarks 9y agoFor complex pages, there is Kantu, which is based on Chromium: https://www.a9t9.com/kantu/web-automation https://www.a9t9.com/kantu/web-automation Not headless, but ideally suited for automating complex websites (date controls, etc).