Elementtype button cannot be clicked

Bug reports.
dkmpbrt
Posts: 26
Joined: Thu Jan 25, 2018 9:00 am
Location: Antwerp
Contact:

Elementtype button cannot be clicked

Post by dkmpbrt » Tue Oct 20, 2020 1:54 pm

Hello,

We have got the same problem as more people that we can't click on a button on website.

it says that the item is no button and the element doesn't support the required capability 'button'.

I've read https://ranorex.com/forum/element-of-ty ... t8289.html and tried to change the adaptertype, however, this isn't possible since "(Default)" is the only option here.

if i change the repository item from //button to //webelement it works, but would want to work with button to ensure Ranorex finds the element as soon as possible.

kr,
Bart

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Elementtype button cannot be clicked

Post by odklizec » Tue Oct 20, 2020 2:19 pm

Hi,

What you can try, and what actually worked for me, is to rename the "Button" element directly in xpath (not in repo element properties) to ButtonTag.
So instead of this:

Code: Select all

//Button[@id='something']
Use this:

Code: Select all

//ButtonTag[@id='something']
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

dkmpbrt
Posts: 26
Joined: Thu Jan 25, 2018 9:00 am
Location: Antwerp
Contact:

Re: Elementtype button cannot be clicked

Post by dkmpbrt » Tue Oct 20, 2020 2:39 pm

Hi odklizec,

Thanks for the quick answer! This indeed works.

Why doesn't Ranorex identify that it is a webdocument and use buttontag automatically though?

Kr,
Bart

User avatar
Stub
Posts: 410
Joined: Fri Jul 15, 2016 1:35 pm

Re: Elementtype button cannot be clicked

Post by Stub » Tue Oct 20, 2020 2:46 pm

No idea, but I too just renamed the RxPath to ButtonTag. Had to do that just an hour ago in fact. Sibling item works as Button, and I cannot spot the difference. Oh well.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Elementtype button cannot be clicked

Post by odklizec » Tue Oct 20, 2020 3:00 pm

Hi,

In my opinion, it's a bug in Ranorex. And because there is an easy workaround, it was most probably never considered critical? ;) Anyway, it should be fixed. The best you can do is to create a support ticket for this issue.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration