get a text from xptha using selenium and phpunit -


<table id="regtable" class="gstable" cellspacing="0" cellpadding="0" style="margin: 20px auto 0px; width: 580px; padding: 5px; font-size: 12px;"> <tbody> <tr> <td id="termstab" height="150" colspan="2"> <div style="width:100%; height:100%; padding-right:5px; overflow-y:auto;"> <p align="justify"></p> <h2 class="parahead" align="center">terms , conditions</h2> 

how can verify 'terms , conditions' text web page. tried verifytextpresent method , other possible methode, not work. need locate path. how can text 'terms , conditions' location.

various ways...

via xpath be:

//h2[text()='terms , conditions'] 

or

//h2[@class='parahead'] 

or

//table[@id='regtable']/descendant::h2[text()='terms , conditions'] 

or using css:

h2.parahead 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -