cancel
Showing results for 
Search instead for 
Did you mean: 

Verifying that a check box is disabled

RogerHoel
Level 3

Hi!

Is there a good way to check if a chec-box can be edited? We se in the html code that there is set a disble="disabled" value in some cases, where the check-box should be greyed out.

We need to be able to catch that the check-box is greyed out and then do a different action than normal.

Any good advise out there on how to eiter check the html code a uniqe text string or see if the check box is greyed out (with that html code flag on the text box?

Hope this is understandable. Not the easiest question to explain, but we see the text we can check for in the HTML code, but it is not in an page item with a normal reference, so not sure how to catch this situation.

Thanks in advance for any good tip on how to check for this before making a desission action.

Kind regards
Roger Hoel




------------------------------
Roger Hoel
------------------------------
1 REPLY 1

Hi @RogerHoel,

Spy the checkbox in Browser Mode and then use the following XPath Expression in the 'Web Path' property:
//input[@disabled='disabled']​
​ Or
//input[@disabled]​



Both of the above XPaths can work depending on the type of HTML coding behind the scenes. Below is an example to show you the same:

HTML Source Code:

32437.png


Test Results:


32438.png



Here, I have used the first attribute to identify the disabled checkbox whereas the second screenshot refers to the expression that I am using to identify the enabled checkbox by using the expression:

//input[not(@disabled)]



Hope this helps you to identify selectors in your case as well.



------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Technical Business Analyst,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------