19-09-23 01:03 PM
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.
19-09-23 01:11 PM
Hello,
There is usually a delay of a few minutes before receipt, check again (check your spam folder too).
Regards,
19-09-23 01:51 PM
Hi @sushmitha c
Could you please try with the Browser mode and select the attributes like below
19-09-23 02:02 PM
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.
22-09-23 01:15 PM
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.
22-09-23 01:19 PM
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.
22-09-23 01:33 PM
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 ?
22-09-23 04:52 PM
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.