get text from SPAN element always returns null
Below is the HTML Structure:
<span id="id1" class="classname1" xmlns="http://www.w3.org/1999/xhtml">
<span class="class_2">User created successfully: Laksh Venkat</span>
When i try to get Text "User Created Successfully: Laksh Venkat" from the
above HTML I have return with null or empty by using XPATH.
So i have tried using JQUERY And below is the code i have used:
String script = "return document.getElementById('id1').text";
But again i'm returned with Null, then i tried using .textContent,
.innerHTML. But nothing is working. Any suggestion Pls??. Could you please
tell me how to get the text from the above HTML. Your help is highly
helpful.
thanks in Advance,
Regards
No comments:
Post a Comment