selenium - Collect all the div id inside the table webdriver using c# -


<table id="tblrenewalagent" cellspacing="0" cellpadding="0" border="0">  <tbody>  <tr>  <td>  <div class="form-row">  <div id="trstatus" style="">  <div id="trfees" class="form-row" style="">  <div id="trfees1" class="form-row ctrl-column" style="">  <div id="trfilingreceipt" class="form-row" style="">  <div id="trcomments" class="form-row" style="">  <div id="trcontact" class="form-row" style="">  <div id="tremail" class="form-row" style="">  <div id="trphone" class="form-row" style="">  <div id="trcell" class="form-row" style="">  <div class="form-row">  <div class="form-row ctrl-column">  <div id="tramountpaid">  <div id="trbalancedue" class="form-row">  </td>  </tr>  </tbody>  </table>

this html code. want collect div id's store in array string. how can it? please me guys.

the idea find div elements (having id attribute) inside table id="tblrenewalagent" , use getattribute id attribute values.

if use linq:

ilist<iwebelement> = driver.findelements(by.cssselector("table#tblrenewalagent div[id]")); list<string> ids = all.select(iw => iw.getattribute("id")); 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -