Unsupported HTML Tag Class

Ask general questions here.
kOoO
Posts: 18
Joined: Wed Oct 17, 2018 11:15 am
Location: Zlin, CR

Re: Unsupported HTML Tag Class

Post by kOoO » Wed Oct 17, 2018 11:27 am

Hello,

Did you find a solution to this problem? I have run into same issue. "class" attribute on "g" elements is not identified by Ranorex. It's identified by browser and properly styled according to that class though. Other attributes of the same element works fine.

Easy workaround exists, just by running this javascript and in Ranorex, instead of @class selector, use @data-class selector.

Code: Select all

var elems = document.querySelectorAll('g[class]');
for(x = 0;x < elems.length;x++){
    elems[x].setAttribute('data-class', elems[x].getAttribute('class'))
}
However it would still be nice to have a "hack free" solution.

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

Re: Unsupported HTML Tag Class

Post by Support Team » Fri Oct 19, 2018 1:13 pm

Hello kOoO,

It does not seem that we have been contacted by that customer.
Would you be willing to contact us directly via our support query: Get in touch with our support team

We are looking forward to your ticket.

Sincerely,
Tomaž
.
Image

t1000k
Posts: 2
Joined: Tue Oct 09, 2018 2:09 pm

Re: Unsupported HTML Tag Class

Post by t1000k » Wed Oct 24, 2018 10:29 am

Hi :)
Quick question
this class "icon_tick_circle" how change properties for it?

McTurtle
Posts: 255
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Unsupported HTML Tag Class

Post by McTurtle » Thu Oct 25, 2018 3:05 pm

Hello t1000k,

I don't think that this is the right forum for this question.
Maybe you should start here: SVG Tutorial

Regards,
McTurtle

t1000k
Posts: 2
Joined: Tue Oct 09, 2018 2:09 pm

Re: Unsupported HTML Tag Class

Post by t1000k » Wed Nov 14, 2018 3:58 pm

Cool thanks!

natesun
Posts: 14
Joined: Wed Oct 17, 2018 4:05 pm

Re: Unsupported HTML Tag Class

Post by natesun » Fri Jun 21, 2019 10:44 pm

I have similar question, but my issue is that the attribute "aria-label" I want to capture is available in chrome but not in IE. So normally I would cast the unsupport tag as Unknown and use find to specify the path. Then use Unknown.getAttribuate<string>("aria-label") to return the value, but since IE show null what do you recommend?

Thanks,
Nate
Attachments
Aria-Label.rxsnp
(1.44 MiB) Downloaded 3 times

natesun
Posts: 14
Joined: Wed Oct 17, 2018 4:05 pm

Re: Unsupported HTML Tag Class

Post by natesun » Mon Jun 24, 2019 8:56 pm

Just follow myself, so I notice that chrome and IE behave differently for an attribute("aria-label") I am looking. It has value in chrome but null in IE. I am trying to execute javascript but I am wondering since I am calling from Unknown tag, how to convert to WebDocument?

IList<Unknown> pathTag = divTag.Find<Unknown>("./tag[@tagname='svg']/tag[@tagname='g' and @visible='true']//tag[@tagname='path' and @visible='true']");

foreach(Unknown unkown in pathTag)
{
//how to call JS with unknown tag?
}