Page 1 of 1

how to check element clickable or not

Posted: Mon Apr 16, 2012 5:16 pm
by sdimbre
Hi All,

I need to check following two elements clickable or not.

1) //span[id='spanid']
2) //a[id='aid']

Thanks,
Sdimbre

Re: how to check element clickable or not

Posted: Tue Apr 17, 2012 1:26 pm
by Support Team
Hi,

Would it be possible to post us a Ranorex Snapshot of those elements?

Regards,
Peter
Ranorex Team

Re: how to check element clickable or not

Posted: Wed Apr 18, 2012 12:12 pm
by sdimbre
The exact xPath for this element is
/dom[@domain='domain' and @caption='caption']//div[@id='LABEL_HOLDER']//span[@id='LABEL']
and on GUI it displays text like 'LABEL', my test case is to check that this LABEL should not be clickable.

Thanks in advance.

SDimbre...

Re: how to check element clickable or not

Posted: Wed Apr 18, 2012 12:16 pm
by Support Team
Hi,

Thank you for posting us the RxPath, but I would need a Ranorex Snapshot to analyze your issue?
How to create a Snapshot

Regards,
Peter
Ranorex Team

Re: how to check element clickable or not

Posted: Thu Apr 19, 2012 8:46 am
by Pavlo
Hi sdimbre

Can you please define what is "clickable" ?
I'm asking because in 99% of cases you can move mouse over element and click. So most likely "clickable" should mean - something happens after clicking on this element. And "non-clickable" should mean - nothing is happening after clicking on element :)
Is that what you are mean "clickable"?

-re
Pavlo

Re: how to check element clickable or not

Posted: Fri Jun 13, 2014 10:14 am
by steve20
Hi,

currently i have this problem.
An element is greyed out but visible for Ranorex.
I want to check wheather this object is not "Clickable" in a certain state.

fyi: I am a total beginner in ranorex.

Re: how to check element clickable or not

Posted: Fri Jun 13, 2014 3:53 pm
by benny28
Hi Steve20, it sounds like you want to validate that the element has an 'Enabled' value of False.

Once you use Spy to get the element attributes, you can then use 'Path Editor' to configure your Xpath to be specific to your needs.

Expand the 'Path Editor' general section and tick the checkbox for 'enabled' and select false from the dropdown menu. Your Xpath should look something like this:

/dom[@domain='domain' and @caption='caption']//div[@id='LABEL_HOLDER']//span[@id='LABEL' and @enabled='False']

Re: how to check element clickable or not

Posted: Tue Jun 17, 2014 1:00 pm
by Support Team
Hi,

Thanks benny for your post!

I just wanted to add that it is also possible to validate if the specific attribute is set to a specific value.
You just need to drag'n'drop the repisitory item representing the specific live element to your action table and select Validate-> AttributeEqual -> Enabled -> True as shown below:
Validate.png
Regards,
Markus