Selenium - Get elements html rather Text Value

前端 未结 3 2189
我在风中等你
我在风中等你 2021-02-18 18:35

Via that code i have extracted all desired text out of a html document

private void RunThroughSearch(string url)
{
    private IWebDriver driver;
    driver = n         


        
3条回答
  •  既然无缘
    2021-02-18 18:38

    I found the solution from SQA-SO

    IWebDriver driver;
    IJavaScriptExecutor js = driver as IJavaScriptExecutor;
    js.ExecuteScript("document.getElementById("title").innerHTML = "New text!";");
    

提交回复
热议问题