Skip to main content
Navigator | Tier 3
August 28, 2025
Solved

How to verify the state of checkbox

  • August 28, 2025
  • 8 replies
  • 154 views

Hi,

I’m using domxpath: //table[@id='_pl5zpc']//tr[$Counter.Number:toString$]//input[@type='checkbox' and contains(@class, 'w-chk-native')] to select the checkboxes. How can I verify that the checkbox is unchecked? Below is the screenshot of the object properties.

 

    Best answer by Padmakumar

    Hi ​@Sakshi,

     

    You can use the Browser → Run JavaScript action for this.

    For e.g., 

    document.querySelector('input[name="group1"]:checked + span').textContent;

    Or

    You can use the Get Status within the Capture action to get the status of the Checkbox. 

     

    Note: The Control Type within the Object property should be as Checkbox in order to use the Get Status option

    8 replies

    Padmakumar
    Premier Pathfinder | Tier 7
    Premier Pathfinder | Tier 7
    August 28, 2025

    Hi ​@Sakshi,

     

    You can use the Browser → Run JavaScript action for this.

    For e.g., 

    document.querySelector('input[name="group1"]:checked + span').textContent;

    Or

    You can use the Get Status within the Capture action to get the status of the Checkbox. 

     

    Note: The Control Type within the Object property should be as Checkbox in order to use the Get Status option

    Padmakumar
    SakshiAuthor
    Navigator | Tier 3
    August 28, 2025

    Hi ​@Padmakumar ,

    Getting below error

     

    Padmakumar
    Premier Pathfinder | Tier 7
    Premier Pathfinder | Tier 7
    August 28, 2025

    Hi ​@Padmakumar ,

    Getting below error

     

    Which browser are you using?

    Padmakumar
    SakshiAuthor
    Navigator | Tier 3
    August 28, 2025

    Edge

     

    Padmakumar
    Premier Pathfinder | Tier 7
    Premier Pathfinder | Tier 7
    August 28, 2025

    Edge

     

    Could you please try the same on Chrome once? Or, open the website on a new Window? Also, what is your CR build, Browser package version and Bot agent version?

     

    You may also refer the below article as well

    A360 | “Run JavaScript action is supported only for web applications or Chromium Embedded Framework applications” error on using Run JavaScript action in browser

     

    Note: 

     

    Padmakumar
    SakshiAuthor
    Navigator | Tier 3
    August 28, 2025

    It is working on Chrome. CR Build: Automation 360 build 37468 and Bot agent version is 22.180.40.

     

     

    Padmakumar
    Premier Pathfinder | Tier 7
    Premier Pathfinder | Tier 7
    August 28, 2025

    It is working on Chrome. CR Build: Automation 360 build 37468 and Bot agent version is 22.180.40.

     

     

    Ok. It could be the problem from the Edge end then. It shouldn't be a Chromium-based one. Please check its version once to make sure that it is not Legacy Edge(EdgeHTML).

    Padmakumar
    SakshiAuthor
    Navigator | Tier 3
    August 28, 2025

    Now it is working on Edge as well. I just selected a new browser window.

    Thank you, ​@Padmakumar for your help.