I am trying to use an XPath in the Firebug console to get a <span>
element's text content.
The actual <span>
tag content is 'first name' with a space within as shown below:
<span class="vl-cell e-listview-container-mail-Col5" iscell="1">first name</span>
When I enter the XPath below into Firebug's command line
$x("//div[@id='tble-listview-container-mail']/div[2]/span[4]")[0].innerHTML
I get the following output:
"first name" // getting a for the space within the string 'first name'.
When I want to get the element containing this text like
$x("//div[@id='tble-listview-container-mail']/div[2]/span[text()='first name']")
I get this as output:
[] // output is returned as empty
Can someone tell how I can get the element if the inner text has a space within it?