How to extract CSS selector of a button when clicked on it?
I'm trying to build a plugin where I need the CSS selector of a button when clicked on it so that I can automate the clicking process when we visit the URL again using document.querySelector(). So how to extract the CSS selector as a string?
After inspecting and copying the selector of a button-
manually copying the css selector
I get this value - #submit_identifier > span.ladda-label
.
How to get the same value using JavaScript when I click on the button?