6.0.2 - HTML Buttontag not recognized as button adapter type

Bug reports.
krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

6.0.2 - HTML Buttontag not recognized as button adapter type

Post by krstcs » Fri Sep 02, 2016 7:40 pm

Ranorex 6.0.2
Windows 10 Pro

It appears that the Button adapter is no longer working for /buttontag elements in new repo items. I am once again having to change the Ranorex generated path "/button[#'myButton']" to "/buttontag[#'myButton']" in order to keep Ranorex from throwing the "Item '<XYZ>' is no Button. The element does not support the required capability 'button'."

This path was generated by Ranorex and should be a button adapter (it is an HTML buttontag element). This has been discussed in the past and appears to be a regression in 6.0.2's repo item generation code. Older elements that already implement the button adapter are not effected.

Again, this appears to be on NEW repo items only. They are created with the standard button icon instead of the buttontag icon, even though they are html "<button>" elements.
Shortcuts usually aren't...

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

Re: 6.0.2 - HTML Buttontag not recognized as button adapter type

Post by Support Team » Mon Sep 05, 2016 1:42 pm

Hi krstcs,

Thank you for reporting this issue. Unfortunately I was not able to reproduce it on a sample webside. I've recorded a simple click on a button tag as shown below.
<!DOCTYPE html>
<html>
<body>
<button type="button" onclick="alert('Hello world!')">Click Me!</button>
</body>
</html>
During the replay, everything worked as expected.
602_ButtonTagClick.png
602_ButtonTagClick.png (24.08 KiB) Viewed 1017 times
602_ButtonTagReport.png
602_ButtonTagReport.png (9.32 KiB) Viewed 1017 times
Please let me know if I've missed a step.

Regards,
Markus (S)
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: 6.0.2 - HTML Buttontag not recognized as button adapter type

Post by krstcs » Tue Sep 06, 2016 4:33 pm

Marcus, I don't think you've missed anything in the steps.

However, this is clearly a Ranorex issue. I'm letting Ranorex generate the RXPath by tracking the element and it creates the item as a button instead of a button tag, and then throws this error when I try to use that element as a button by clicking it. I've done this a thousand times (literally! :D ) and this is the first time this has happened since the fix that was made to have the buttontag be treated as a button (I don't remember when this was, but it was in 4.X sometime, I think). But this is also the first time I've added a buttontag element in 6.0.X, the rest were all done in 5.4.X or earlier.

So, I'm not sure what else to do. If you let me know what you guys might need I'll see if I can help.
Shortcuts usually aren't...

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

Re: 6.0.2 - HTML Buttontag not recognized as button adapter type

Post by Support Team » Thu Sep 08, 2016 8:21 am

Hi krstcs,

I've checked that behavior also in older versions 5.x, but I was not able to spot any difference.
The only time I was able to reproduce that issue was when I've created the corresponding repository item manually by following these steps:
  • Open external Spy and track the buttontag
  • Copy the generated path
  • In Ranorex Studio, add new Repository item
  • Insert path
Perhaps we need to arrange a short remote session to see what exactly is happening on your machine.
Please let me know if that would by possible by getting in touch with us per email.

Thank you in advance.

Regards,
Markus (S)
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: 6.0.2 - HTML Buttontag not recognized as button adapter type

Post by krstcs » Thu Sep 08, 2016 1:51 pm

OK, it appears that this is specific to the SUT that I'm testing as I also can't get it to happen anywhere else. It is an HTML document so I'm not sure why Ranorex is thinking the <button> tag is a UI button. In fact, it only happens on certain buttons on that document, so I'm not sure that there isn't something going on with the page itself.

But that doesn't explain why Ranorex is creating a Button repo item from an HTML element instead of a ButtonTag item.

Unfortunately it will not be possible to have a remote session as the application that this is happening on is a 3rd-party application and I don't have any authority to allow anyone outside our organization to view it at this time.
Shortcuts usually aren't...

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

Re: 6.0.2 - HTML Buttontag not recognized as button adapter type

Post by Support Team » Tue Sep 13, 2016 6:33 am

Hi krstcs,

Basically, "Buttons" and "ButtonTags" are recognized as button in the RxPath because it is some kind of shortcut for both capabilities. The repository item itself is aware of the difference since it stores the possible capabilities, except, the repository item is generated manually using "Add New Item".

But, there is already an entry in our internal bug tracking system which handles this scenario.

I hope that information helps understanding that situation.

Regards,
Markus (S)
.
Image