我有一個文本區域,我需要在那里輸入完整的 HTML。在 BDD,我將傳遞文件的路徑,但我不知道如何捕獲完整的 HTML(帶有標簽)以通過 SendKeys 應用于文本區域。我使用 Specflow + Selenium + C#Scenario Outline: Input Disclaimer Filme Given I choose the type of disclaymer <type> When I open the html file <file> Then I send then Examples: | type | file | | "Cota Capital" | "C:\Disclaimers\CotaCapital.html" | | "Caucionamento" | "C:\Disclaimers\Caucionamento.html" | 方法內部:driver.FindElement(By.Id("TxtConteudo")).SendKeys(fullHtml);我想打開文件,讀取所有 html,將其保存在某個 var / string 中,然后將其傳遞給 textArea。
使用 Selenium 在 textArea 中輸入完整的 html
慕碼人8056858
2022-11-22 16:27:41