1

I won't bother with too many details but I need to programatically click on elements on a webpage. https://keep.google.com/ to be exact. For various reasons I cannot use things like iMacros or Greasemonkey userscripts.

If I was on Windows then I could use VBA to interact with the IE window.

I'm wondering if there is something similar to this for Ubuntu/Linux for Chrome or FireFox or some browser?

I'm hoping for a scripting language like Python, Perl, Bash, or JavaScript.

Just some way I can load a page and then interact with the DOM and invoke events like click and keyboard.

  • You could expand on "For various reasons I cannot use things like iMacros or Greasemonkey userscripts". – DK Bose Dec 13 '15 at 1:51
  • @DKBose: iMacros doesn't have IF conditions and userscripts won't let me do IsTrusted = true mouse events. Google won't let user JS interact with the page. – IMTheNachoMan Dec 13 '15 at 1:58
  • Take a look at Mechanize and BeautifulSoup but I'm not sure that's what you are asking for. They are Python libraries to emulate a web browser. – Ashhar Hasan Dec 13 '15 at 4:21
  • Are the elements always on the same position on the screen? – Jacob Vlijm Dec 13 '15 at 6:16
  • @JacobVlijm: No. So I'd need a way to be able to find elements using selectors or something and then finding their position. – IMTheNachoMan Dec 13 '15 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.