Code: Select all
string tdRxPathBase = "/dom/body/div[1]/table/tbody/tr[1]";
string tdRxPath = tdRxPathBase + "/td[17]";
TdTag eTdTag = null;
Host.Local.TryFindSingle(tdRxPath, 10000, out eTdTag);
eTdTag.MoveTo();
eTdTag.SetStyle("width","10");
Code: Select all
string tdRxPathBase = "/dom/body/div[1]/table/tbody/tr[1]";
string tdRxPath = tdRxPathBase + "/td[17]";
TdTag eTdTag = null;
Host.Local.TryFindSingle(tdRxPath, 10000, out eTdTag);
eTdTag.MoveTo();
eTdTag.SetStyle("width","10");
<td width="1" j="" style="width: 1px;">MyTD</td>If you want to set the CSS style attribute “width” please use the following code:
Code: Select all
eTdTag.SetStyle("width", "700px");
Code: Select all
eTdTag.Width = "700";
Code: Select all
<td class="v-table-header-cell" style="width: 83px;">
<div class="v-table-resizer"></div>
<div class="v-table-sort-indicator"></div>
<div class="v-table-caption-container v-table-caption-container-align-left" style="width: 69px;">Categories</div>
</td>
Code: Select all
Host.Local.TryFindSingle(hdrTdRxPath, 1000, out hdrTd);
hdrTd.MoveTo();
hdrTd.Class = "";
hdrTd.SetStyle("width","10");
DivTag innerHdrDiv = null;
Host.Local.TryFindSingle(hdrTdRxPath + "/div[3]", 1000, out innerHdrDiv);
innerHdrDiv.Class = "";
innerHdrDiv.SetStyle("width","10");
Code: Select all
<td class="" style="width: 83px;">
<div class="v-table-resizer"></div>
<div class="v-table-sort-indicator"></div>
<div class="" style="width: 69px;">Categories</div>
</td>
Code: Select all
hdrTd.SetStyle("width","10px");