I create Console Application using Selenium to get the text from a table.
Tried with code:
IList<IWebElement> tableRows = browser.FindElementsByXPath("id('column2')/tbody/tr");
var doc = new HtmlDocument();
doc.LoadHtml(tableRows);
This error like:
'HtmlDocument' does not contain a constructor that takes 0 arguments
I read this answer from question
Almost people in Stackoverflow can be using like:
new HtmlDocument.
Why I can't be using this. I tried with Winform Application, but I also can't using HtmlDocument.
And HtmlDocument seems only LoadHmtl(String). But my code is IList<IWebElement>.
I don't know how to convert it to HTML string to add to doc.