Baz Baz - 10 months ago 56
Javascript Question

Locating ids with forward slashes

I have the following button:

<button id="Organisation/user" class="button-2xhG8" data-reactid=".0.2:$organization.0.0.2:$1/47">org</button>

And I am trying to click on it using:


to no avail. The following does work though:


and I can click on other buttons without don't user forward slashes in their ids. How do I locate the button?

Answer Source

You'll have to double-escape special characters in attributes