How to verify if mobile element is greyed out or not

Hi all,

I have a mobile element that is sometimes greyed out but can still be selected. How do i verify that
this mobile element is greyed out? Thanks.

Seems like this worked back in 2018:

FYI, this is mobile, not web. Note that the mobile element that is greyed out is dynamic, so sometimes it’s greyed out and sometimes it’s not, all depends on the test case.

I noticed it had WebUI while under “Mobile Testing”, however, I see that there are:

Sorry this is very confusing, i have multiple links shown, which one is it? Get Attribute or Verify Element Attribute Value?

They both look at the attributes of an element. If you want to just verify the attribute is in a certain state, then use the verifyElementAttributeValue. Use getAttribute to do some other comparison test.

FYI, I want to validate that the element is greyed out, not disabled/enabled. The element is always enabled whether it’s greyed out or not. There is no “greyed out” object property so I don’t think the solution proposed above will work.

As far as I know, there is still no way to get anything like text size, font colour or similar from Appium/Katalon for mobile. If you have a web context in the mobile you should be able to but not in a native app. Please correct me if something has changed!
One suggestion - create two versions of the element using Image Select - one is regular, one is the grey version. Then verify that expected element is present, depending on scenario?

@Dan_Bown One suggestion - create two versions of the element using Image Select - one is regular, one is the grey version.

How is this done via Katalon Studio? FYI, I do not have the paid version.

Hi - the link was in the post but I see it is for Enterprise only I’m afraid. Sorry, I’m out of ideas now!

No problem. Once we get the enterprise version I will follow up. Thanks.

One thing I want to ask. When I use Mobile.verifyElementAttributeValue or Mobile.verifyElementAttributeValue to find the value of an object attribute (eg: selected),
it always returns the value stated in the Object Repository for that specific object. Is there a way to dynamically get the value of an object attribute during a test case execution? Thanks.

Hi @mgrandillo,

The element property value return from Mobile.verifyElementAttributeValue keyword is retrieving from the Mobile element at the runtime. If your element properties have changed, the value of the changed property should be different from the old one.

Please share your test scripts, a video recording on your mobile device and more details about your test scenarior.