Not able to access right side of DevExpress control

Ask general questions here.
IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

Not able to access right side of DevExpress control

Post by IanKnight » Wed Oct 15, 2014 9:32 am

Hi,

I have an issue with a DevExpress control that is split into two parts, the first part is a button that when pressed initiates a search. The button type as reported by Spy is - DevExpress.XtraEditors.DropDownButton

The smaller part of the button on the right, initiates a drop down list to be displayed.

Spy can find the whole control, however only recognises the bigger left part of the control, the right hand side of the control is not accessible in any way, and the only way we have been able to automate it is with an image search.

Even using the click CenterRight action does not access the right side of the control, only the right side of the left part.

I have attached a screenshot of the control so you can see what it looks like, it is the Find button with the down arrow to the right of it.

Any help in trying to access the right side directly would be appreciated.
Attachments
findbutton.jpg
findbutton.jpg (24.46 KiB) Viewed 1155 times

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

Re: Not able to access right side of DevExpress control

Post by Support Team » Mon Oct 20, 2014 1:06 pm

Hi IanKnight,

In many cases, custom Windows Forms or 3rd party provided controls are not built with accessibility in mind.
Therefore, you are not able to identify the specific part of your control.

Please find further information on how to implement accessibility here: “Enabling automation for 3rd party controls by adding Accessibility”

Please check whether you used to correct element for your button click. The “Click”-action should work without identifying the “inner part” of the button as well.

Regards,
Robert
.
Image

IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

Re: Not able to access right side of DevExpress control

Post by IanKnight » Mon Oct 20, 2014 2:13 pm

Hi,

This is a DevExpress control that Ranorex is advertised as supporting without any of the complex extra coding you pointed me at.

The problem is the control has two clickable elements the main one being the obvious "Find" part of the control the second is the down arrow part of the control that Ranorex cannot see in Spy or anywhere else.

This might make things clearer about what I mean -
Attachments
findbutton_2.jpg
findbutton_2.jpg (21.14 KiB) Viewed 1122 times

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

Re: Not able to access right side of DevExpress control

Post by Support Team » Mon Oct 20, 2014 2:54 pm

Hi,

Thank you for the clarification.

Please try to create a location based click on the Dropdownbutton (The button should be recognized from Ranorex as a button-element):
DevExpress_DropDownButton.png
DevExpress_DropDownButton.png (38.16 KiB) Viewed 1118 times
Regards,
Robert
.
Image

IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

Re: Not able to access right side of DevExpress control

Post by IanKnight » Mon Oct 20, 2014 3:29 pm

I can do that, as you can see below.

The repo item element for both is the same button, and the repo item xPath automatically created is -

?/?/container[@controlname='contentPanel']/?/?/element[@controlname='buttonFind']/button[@accessiblename='Find']

The problem is of course that that this dialog box can be resized and the button is not always going to be that shape, the click center right action doesn't always go far enough to the right to click the drop down element.
Attachments
findbutton_3.jpg
findbutton_3.jpg (17.53 KiB) Viewed 1115 times

IanKnight
Posts: 33
Joined: Thu Feb 21, 2013 12:52 pm

Re: Not able to access right side of DevExpress control

Post by IanKnight » Mon Oct 20, 2014 4:09 pm

If there is genuinely no way of accessing that second element to the button directly then just a thought, what we really need is a relative position click.

If the button is 100 pixels wide I can specify I want to click at (Button Width - 5 pixels) 95 in this case, so if the button is resized to 200 pixels the calculation result is 195

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

Re: Not able to access right side of DevExpress control

Post by Support Team » Wed Oct 22, 2014 7:21 am

Hi IanKnight,

Yes, I’m afraid that there is not easy way of accessing the 2nd part of the button. Therefore, I suggested a location based click using relative coordinates in my previous post. I'm sorry if that wasn't explained clear enough.
DevExpress_DropDownButton.png
DevExpress_DropDownButton.png (38.17 KiB) Viewed 1096 times
Regards,
Robert
.
Image