how to check element clickable or not

Ask general questions here.
sdimbre
Posts: 21
Joined: Wed Sep 07, 2011 12:38 pm

how to check element clickable or not

Post by sdimbre » Mon Apr 16, 2012 5:16 pm

Hi All,

I need to check following two elements clickable or not.

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

Thanks,
Sdimbre

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: how to check element clickable or not

Post by Support Team » Tue Apr 17, 2012 1:26 pm

Hi,

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

Regards,
Peter
Ranorex Team
.
Image

sdimbre
Posts: 21
Joined: Wed Sep 07, 2011 12:38 pm

Re: how to check element clickable or not

Post by sdimbre » Wed Apr 18, 2012 12:12 pm

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...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: how to check element clickable or not

Post by Support Team » Wed Apr 18, 2012 12:16 pm

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
.
Image

Pavlo
Posts: 43
Joined: Fri Dec 30, 2011 10:55 am

Re: how to check element clickable or not

Post by Pavlo » Thu Apr 19, 2012 8:46 am

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

steve20
Posts: 6
Joined: Wed Jun 04, 2014 9:13 am

Re: how to check element clickable or not

Post by steve20 » Fri Jun 13, 2014 10:14 am

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.

benny28
Posts: 34
Joined: Thu May 31, 2012 4:48 pm
Location: London
Contact:

Re: how to check element clickable or not

Post by benny28 » Fri Jun 13, 2014 3:53 pm

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']

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: how to check element clickable or not

Post by Support Team » Tue Jun 17, 2014 1:00 pm

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
Validate.png (2.77 KiB) Viewed 1517 times
Regards,
Markus
.
Image