Chrome extension, click button on page

10,375 views
Skip to first unread message

vperd...@gmail.com

unread,
Mar 16, 2012, 12:55:31 PM3/16/12
to google-chrome-...@googlegroups.com
Hi,

I'd like to developp a chrome extension wich can interact with webpages.
For example : read html code and click on a button display on the webpage.

Is it possible ?

Thanks a lot :-)

Andrey Kosyakov

unread,
Mar 16, 2012, 1:04:55 PM3/16/12
to vperd...@gmail.com, google-chrome-...@googlegroups.com
Hi,

Yes, it's possible, the best place to start is
http://code.google.com/chrome/extensions/getstarted.html

This group is dedicated to Chrome Developer Tools, the best place to
ask generic extensions questions is at chromium-extensions group:
http://groups.google.com/a/chromium.org/group/chromium-extensions/topics

Best regards,
Andrey.

and...@pavloco.com

unread,
Dec 13, 2012, 12:15:38 PM12/13/12
to google-chrome-...@googlegroups.com, vperd...@gmail.com, ca...@chromium.org
Hi, was anything ever found from this? I'm interested in a similair idea but I can't find any documentation. 

Thanks,

Andrew

Sam Dutton

unread,
Dec 14, 2012, 2:41:59 AM12/14/12
to and...@pavloco.com, google-chrome-...@googlegroups.com, vperd...@gmail.com, ca...@chromium.org
Hi, was anything ever found from this? I'm interested in a similair idea but I can't find any documentation.

Did you try the resources pointed to by Andrey?

Yes, it's possible, the best place to start is
http://code.google.com/chrome/extensions/getstarted.html
This group is dedicated to Chrome Developer Tools, the best place to
ask generic extensions questions is at chromium-extensions group:
http://groups.google.com/a/chromium.org/group/chromium-extensions/topics

Sam 

stephen.g...@gmail.com

unread,
Feb 9, 2013, 3:55:49 AM2/9/13
to google-chrome-...@googlegroups.com, vperd...@gmail.com
It would have been nice to find this here, so here it is:
var input = document.body.children[1].children[2].children[1];
input.click();
 
or if you are lucky enough:
var input = document.getElementById("input_name");
input.click();

Matan Safriel

unread,
Apr 3, 2017, 2:01:19 AM4/3/17
to Google Chrome Developer Tools, vperd...@gmail.com, stephen.g...@gmail.com
Indeed this is nice to find this here rather than the general references to a website with dozens of API groups :-) I've used the API before and this is much more focused than searching the api docs once again. In fact, this is the right answer as the API doesn't bother with browser automation, as it only takes a plain javascript call to perform as shown below.

For a moment there while searching the api docs, I thought this may not be supported due to security/accountability concerns, but hopefully this here is not blocked by the chrome extension runtime model..
Reply all
Reply to author
Forward
0 new messages