How to click this button, no name or id?

142 views
Skip to first unread message

Chris Green

unread,
Jan 9, 2022, 12:47:54 PM1/9/22
to chrome-...@googlegroups.com
I want to click a button whose code is:-

<button class="action__button" type="button" title="">

There isn't an obvious way to click() the button. Any ideas?

--
Chris Green

Autofill Extension

unread,
Jan 10, 2022, 3:26:14 PM1/10/22
to Autofill Extension
Hi Chris, can you provide the complete code to the button? If you can come up with a CSS selector that only returns this button, then we can automate clicking it.

Chris Green

unread,
Jan 10, 2022, 4:10:25 PM1/10/22
to chrome-...@googlegroups.com
On Mon, Jan 10, 2022 at 12:26:14PM -0800, Autofill Extension wrote:
> On Sunday, January 9, 2022 at 9:47:54 AM UTC-8 c...@isbd.net wrote:
> > I want to click a button whose code is:-
> > <button class="action__button" type="button" title="">
> > There isn't an obvious way to click() the button. Any ideas?
> > --
> Hi Chris, can you provide the complete code to the button? If you can
> come up with a CSS selector that only returns this button, then we can
> automate clicking it.
>

Here's the code:-

<div class="identify-action-btn">
<div data-pl="initialized" class="action action--primary action--authentication">
<button class="action__button" type="button" title="">
Continue
</button>
</div>
</div>

I guess that identify-action-btn is probably unique on the page, the
other 'action action--primary action--authentication' is too I guess
but it's a bit of a mouthful! :-)

It is the only button on the page but there are other text fields and
drop-down selectors.

--
Chris Green

Autofill Extension

unread,
Jan 10, 2022, 9:11:27 PM1/10/22
to Autofill Extension
Try this JS rule:

let elButton = document.querySelector('.identify-action-btn button');
if (elButton) {
  elButton.click();

Chris Green

unread,
Jan 11, 2022, 6:11:13 AM1/11/22
to chrome-...@googlegroups.com
On Mon, Jan 10, 2022 at 06:11:27PM -0800, Autofill Extension wrote:
> Try this JS rule:
>
> let elButton = document.querySelector('.identify-action-btn button');
>
> if (elButton) {
>
> elButton.click();
>
> }
>
Worked perfectly, thank you. It's a good template for other similar
things too.

--
Chris Green

Autofill Extension

unread,
Jan 11, 2022, 8:02:43 PM1/11/22
to Autofill Extension
Yeah, someone on here once automated entire supremenewyork.com checkout flow using JS rules to help them get in on the drops. Another person was able to automate their Craigslist business. I never imagined these uses -- people are so creative!
Reply all
Reply to author
Forward
0 new messages