64 Character Limit for Selectors

Do selectors in chrome have 64 character limits for the attributes? When using UiExplorer it keeps truncating them and adding a *

Is there a way to stop it doing this?

@andrewjames
truncating and adding the * wildcard char is for making the selector more generic and not about char limits.

In some cases the assumption from UiExplorer needs some adoptions. So feel free to rework the selector e.g with full string or another strategy.

I’ve extended the truncated values, but it seems a very odd thing for it to do. Always seems to be at 64 chars on every selector.

have a look on this selector (done by UiExplorer):

<html app='chrome.exe' htmlwindowname='https://images-eu.ssl-images-amazon.com/images/I/11EIQ5IGqaL._RC%7C01ZTHTZObnL.css,41SIz69qHYL.css,31qGOnSAToL.css,013z33uKh2L.css,017DsKjNQJL.css,0131vqwP5UL.css,41EWOOlBJ9L.css,11TIuySqr6L.css,01ElnPiDxWL.css,11bGSgD5pDL.css,01Dm5eKVxwL.css,01IdKcBuAdL.c*' title='SanDisk Ultra Fit USB 3.1 Flash-Laufwerk 256 GB: Amazon.de: Comp*' />
<webctrl idx='1' parentid='acrPopover' tag='I' />

as you can see it adds the * for generalization purpose but also can be more then 64 chars.

With a look on your selector also we would recommend to post edit the initial taken selector following the principle:

  • as general as possible
  • as short and reliable as possible
1 Like

I wouldn’t rely on a src URL for a selector. Too easy for a URL to change somehow.

And the id and parentid look autogenerated which means they likely change and won’t be reliable in a selector.

That wasn’t my final selector. It was just an example of the auto-truncation in UiExplorer.

Gotcha. Yeah I would prefer it didn’t auto-truncate. Let me make that decision.

1 Like