# How to  quickly  test a css selector in the brower console used for user/action/sesion TAG

**URL:** <https://community.dynatrace.com/t/how-to-quickly-test-a-css-selector-in-the-brower-console-used-for-user-action-sesion-tag/38155>\
**Category:** Dynatrace Tips\
**Tags:** user-actions, tagging, user-sessions, javascript\
**Created:** [January 26, 2023, 9:11am UTC](https://community.dynatrace.com/t/how-to-quickly-test-a-css-selector-in-the-brower-console-used-for-user-action-sesion-tag/38155 "2023-01-26T09:11:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [January 26, 2023, 9:11am UTC](https://community.dynatrace.com/t/how-to-quickly-test-a-css-selector-in-the-brower-console-used-for-user-action-sesion-tag/38155/1 "2023-01-26T09:11:08Z")

</div>

Hello,

use:

**document.querySelector(“_anycsstag_”).textContent or**

**document.querySelector(“_anycsstag_”).innerText**

(Normally please do not forget the . or #)

Extra info:

_ **CSS selector**. Use when the user’s identifier is visible on the page. This mechanism captures the first match&nbsp;innerText/textContent&nbsp;value (available for browsers that support&nbsp;querySelector)_

 ![henk_stobbe_4-1674723615940.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/6/e61d4d1bc01b503258a1efc3a81c2fb97c360707.png)

 ![henk_stobbe_5-1674723705885.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/7342c5f7649091c6b1e8492735ba0970ce0ce11e.png)

KR Henk

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [February 10, 2023, 1:31pm UTC](https://community.dynatrace.com/t/how-to-quickly-test-a-css-selector-in-the-brower-console-used-for-user-action-sesion-tag/38155/2 "2023-02-10T13:31:45Z")

</div>

Great Tip/Trick&nbsp;[@henk\_stobbe](https://community.dynatrace.com/user/11427)&nbsp;Thanks for sharing 🙂
