cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to read and set Checkbox in chrome

Sushmitha.C
Level 3

I want to select checkbox in my automation. I am able to spy checkbox in browser and UI mode.

in Ui mode element type is UI automation and in browser mode element type is web element. I am not able to set checkbox true or get checked status By i changing the type to checkbox manually. 

Error: Unable to find a valid pattern - required: TogglePattern

What other ways can i use to select the checkbox.



------------------------------
sushmitha c
------------------------------
7 REPLIES 7

Hello,


There is usually a delay of a few minutes before receipt, check again (check your spam folder too).

Regards,



------------------------------
Leonardo Soares
RPA Developer
------------------------------
Leonardo Soares RPA Developer América/Brazil

faheemsd
MVP

Hi @sushmitha c

Could you please try with the Browser mode and select the attributes like below 

11594.png



------------------------------
SYED FAHEEM
RPA Developer
DAR-ME
Asia/Kolkata
------------------------------

harish.m
MVP

HI Sushmitha,


Try to  respy the checkbox sometime by just moving the cursor you might spy inside and outside of checkbox

and if the element is check box type most likely it is able to capture whether it is checked or not( Try both Browser and UIA mode)

So As mentioned by Leonardo you can add delay and verify manually.



------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"

Harish Mogulluri
Lead developer
America/New_York TX
------------------------------
----------------------- If I answered your query. Please mark it as the "Best Answer" [FirstName] [LastName] [Designation] [JobTitle] [City] [State] [Phone]

Hi In browser mode web Input Type attribute is empty so i cant include it. Even though its checkbox bp is not considering at one.11595.png



------------------------------
sushmitha c
------------------------------

Hi Harish by default element is not getting identified as checkbox by BP.  adding delay is not helping.

 I am using Global send keys with space to select checkbox. but i want to know is there more reliable way.



------------------------------
sushmitha c
------------------------------

Hi @sushmitha c - Have you tried using application navigator too to check the root elements in the element tree ? also what's the default behaviour of that check box ? is it checked already or unchecked ?



------------------------------
Regards,

Mukesh Kumar - Senior Automation Developer

NHS, England, United Kingdom, GB
------------------------------
Regards,

Mukesh Kumar

The element may not actually be a checkbox, it might something else styled to appear as a checkbox. If this is the case then get/set checked won't work.

If you do right-click > Inspect in your browser, you should be able to see the HTML and maybe figure out what it is.

It might be that the un/checked state can be identified from an attribute, such as the class. Maybe a Click will be more reliable, depending if the element can receive clicks.



------------------------------
John Carter
Blue Prism
------------------------------