Chrome -- How to click a CHECKBOX?

I am trying to use KM to tick (check) 2 checkboxes (e.g. ART/General & ART/African) in Google Chrome.

I've failed with both:
-- "Set Chrome Checkbox" [the relevant Checkboxes are not listed in the dropdown "Chrome" menu]
-- "Press a Button"

  1. The simple case is as in the screenshot with the checkboxes onscreen.

but also I'd like to do the following:

  1. The checkboxes are offscreen e.g. in the HISTORY section further down the list of categories. I'd like to check HISTORY/General & HISTORY/African checkboxes.

  2. I'd like to pass both HISTORY and General etc. as Variables to choose the correct checkboxes.

Thanks.

The difficulty may be related to the context of a pop-form, rather than a simple web page.

Is that a publicly accessible resource that we can look at ?

If not, it's possible that you can get the XPATH to the control by:

  • Ctrl click it
  • Choose 'Inspect' from the contextual menu

and then in the webkit source view,

  • Ctrl-click the highlighted source element for the control
  • Choose Copy As XPATH from the contextual menu

It may then be possible to find a solution using some the XPATH resources and sample code on this forum from an Execute Chrome JavaScript action, or, perhaps more simply, from a custom action like:

Again, however, it is possible that the popup form context would need some additional special handling - hard to tell without seeing the page itself and the way in which its source code is written.

Thanks for the info. This is for a standard kdp.amazon.com/title-setup webpage.

I tried to follow your instructions (I had to switch temporarily from Chrome to Safari to do the “Inspect Element”). Please see screenshot below.
(I am also not sure how to do the “Copy as XPATH” from here?)

Perhaps the ID: "checkbox-art_general” could be generated from variables and used in KM? Any ideas?

Copy as XPath is Chrome-only.

If you can find Inspect Element in the Chrome contextual menu, you may need to go through the menu system:

View > Developer

OK I’ve seen the page - looks tough: the pop-up code is in the main page, but I think the checkboxes are generated by JavaScript code rather than by standard HTML elements.

Not a hat from which I can personally pull a rabbit I’m afraid …

Here's the screenshot of the code from CHROME.

-- After Inspecting the element the COPY AS XPATH GIVES: //*[@id="checkbox-art_general"]

-- COPY AS ELEMENT GIVES:input id="checkbox-art_general" type="checkbox" name="" value="" nodeid="art_general"