How can I use xpath instead of id to find the element in DOM. I know that for id I can use:
On Firefox console you can find (and explore) the element like this:
But if you want to call a function on the element, you have to call it like this:
because there is always an array of elements returned (provided that the element is present and the first one in the array).