cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CSS selector for user tagging trouble incl GT or spaces

RayT
Visitor

Does the User Tag, CSS selector handle the greater than sign &/or spaces?  

My experience is that it doesn't OR I just cannot get the right selector value.

 

A value of: #pgl60>span.pt-header-right-user with/without spaces " > "

Results in this in the header: md=mdcc1=a#pgl60^rbspan.pt-header-right-user or with/without spaces " ^rb "

 

Whether that is interpreted by the Dyna JS properly & also whether that is why the user tagging fails or not I'm not sure but I have tried all the following:

#pgl60.flex.af_panelGroupLayout@innerText

#pgl60%3Espan.pt-header-right-user

#pgl60>span.pt-header-right-user

#pgl60%E3;span.pt-header-right-user

#pgl60>span.pt-header-right-user

#pgl60&gtspan.pt-header-right-user

#pgl60>span.pt-header-right-user@innerText

 

For this html

RayT_0-1623916829612.png

 

I've even tried straight #pgl60 since in Chrome tools it's innerText is the user value I'm after.

Similarly note that top attempt, refers to the pgl60 parent with no sub selector ">"

- again since the value does actually come up in Chrome as innerText of that parent.

 

The expected #pgl60, #pgl60>span.pt-header-right-user  both work fine in the Chrome DEV console 

eg: $$("#pgl60>span.pt-header-right-user")

 

I "think" one of those might actually have worked but due to the delay when testing I don't know which - trying to work that out now & have turned on session replay just to see if I can analyze html afterwards. In the meantime any tips from the learned might be helpful.

 

Cheers

RT

 

4 REPLIES 4

ChadTurner
Guru

from my experience, it does. grabbing that tag value can be quite a hassle. I typically find the target, then highlight it, inspect, then right click and copy the selector value. keep in mind it could take a while for new data to show up. and if you dont delete your older rule, make sure you move your new rule up to the top of the list. 

 

I'd inspect the span class on the next line and give that a go.

-Chad

RayT
Visitor

Thanks for that. Well the verbatim copy selector in Chrome is "#pgl60 > span"  

So I will give that a shot & leave it for a good while before deciding success or failure.

 

Cheers

RayT
Visitor

Got a feeling now it might be iframe related.  I see the following in the html

<script ... data-dtconfig="...|md=mdcc1=a#pgl60 ^rb span@innerText||ssv=4|lastModification=1623994683482...</script>

 

Then later in an iframe

<iframe name="afr::PushIframe" id="afr::PushIframe" style="display:none" src="/portal/afr/blank.html">
...
<script ... data-dtconfig="...|md=mdcc1=apg160|ssv=4|lastModification=1623810190706..."></script>

 

So in the 2 dtconfig - different lastMod but same app... & that 2nd one in the iframe wouldn't be valid no doubt - no # ...  ^^ ???

 

arrgh

Cordelia25
Newcomer

It's reasonable to use an attribute selector is when the attribute is meaningful and related to why you want to pick that element, and not arbitrary. For example, if you want to add padding to all of your range inputs (<input type="range">, this is great: input[type=range] { padding: 4px; } It's usually not worth adding an additional class like class="slider" to all of those elements, because you can already uniquely select for them. On the flip side, suppose you had a <iframe src="ad.html">. In theory, you could select for that iframe using iframe[src="ad.html"], but that'd be a terrible idea, because if you ever changed the url you'd have to update the CSS too. That's a case where clearly a class or id is better.

 

 

myaarpmedicare.com