-5
HTML代碼,獲取從網絡元素文本我如何使用C#
<span id="lbl_OrderNum" class="ff1 fs12 fwb " style="font-size:18px;"> eSYS9778</span>
C#代碼
driver.FindElementById("lbl_OrderNum").GetAttribute("textContent");
Console.WriteLine("textContent");
我如何使用獲取的文本或獲得屬性的文本保存在我的硒代碼?
請問你嘗試過什麼了嗎? – Xiaoy312
driver.FindElementById(「lbl_OrderNum」)。GetAttribute(「textContent」); Console.WriteLine(「textContent」); – sunizzil
'driver.FindElementById'返回的元素應該具有'Text'屬性。 – Xiaoy312