我有一個(gè)文本區(qū)域,我需要在那里輸入完整的 HTML。在 BDD,我將傳遞文件的路徑,但我不知道如何捕獲完整的 HTML(帶有標(biāo)簽)以通過(guò) SendKeys 應(yīng)用于文本區(qū)域。我使用 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" | 方法內(nèi)部:driver.FindElement(By.Id("TxtConteudo")).SendKeys(fullHtml);我想打開(kāi)文件,讀取所有 html,將其保存在某個(gè) var / string 中,然后將其傳遞給 textArea。
使用 Selenium 在 textArea 中輸入完整的 html
慕碼人8056858
2022-11-22 16:27:41