Help us make DevTools Tips better! Fill out this survey to tell us more about your DevTools habits and frustrations.
document.getElementById() or similar. Other times however, a more complicated CSS selector needs to be created and used with
- Find the node you are interested in in the Elements tool.
- Right-click the node and select Copy > Copy JS path.
- The right
document.querySelector()expression is now in your clipboard. You can paste it anywhere you need it.