vendredi 10 mars 2017

Getting text from table Selenium - how to use getAttribute for the values i need

When I run getText() for each cell in the table, it only outputs the cells which are static. When using getAttribute("innerHTML") this is what I get for each cell:

row # 1, col # 2text= WIDTH: 100%; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px">title=800011694 class="th-if th-ip-dfd" id=C30_W89_V90_V91_crmdata_partner_no >style="WIDTH: 100%" onkeydown="if(htmlbEnterKey(event)){return false;}" >readOnly value=800011694>title=Phone: class="th-lb th->lb-txtlblrgh th-ellipsis" id=C30_W89_V90_V91_thtmlb_label_2 style="WIDTH: 100%; >WHITE-SPACE: nowrap" for=C30_W89_V90_V91_crmdata_tel_number>Phone: row # 1, col # 4text=

The value I need is to get is 800011694, which I can see as the title and readOnlyValue, however, getAttribute("title") does not return anything.

Aucun commentaire:

Enregistrer un commentaire