selenium - Javascript get the value from an h4 Tag -


i trying value lotus of h4 tag code below

    <a id="linksale" class="linkaccess" title="" href="/vp4/home/handlers/operationaccess.ashx?operationid=17285" onclick="javascript:prepareeventonlinksanchor(17285);">      <h4>lotus</h4>      <p class="datesales">du <em><strong>mercredi&nbsp;1 mai</strong>&nbsp;9h</em> au <em><strong>dimanche&nbsp;5 mai</strong>&nbsp;6h</em> </p>      <p class="baseline"></p>      </a>     

to did follow :

var h=document.getelementbyid("17285");

var i=h.getelementsbytagname("h4");

which returned following line :

<h4>lotus</h4> 

what want value lotus converted text.

document.getelementbyid("linksale").getelementsbytagname("h4")[0].innerhtml 

will work


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -