-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I try to process web pages with mathml using mathjax via nhtmlunit
In java (using htmlunit) everything is fine.
I use the next snippet:
WebClient webClient = new WebClient(BrowserVersion.CHROME);
HtmlPage page = webClient.getPage(new File(mathml).toURI().toURL());
webClient.waitForBackgroundJavaScript(300000 * 1000);
String pageAsXml = page.asXml();
and the next html - https://pastebin.com/hvJZmtnH
The result is quite good : https://pastebin.com/kHzrM3rJ
However it's not so good in C# (NHtmlUnit):
The code i use:
WebClient webClient = new WebClient(BrowserVersion.CHROME);
webClient.Options.JavaScriptEnabled = true;
webClient.Options.Timeout = 30000;
webClient.Options.RedirectEnabled = true;
HtmlPage page = webClient.GetHtmlPage(mathml);
webClient.WaitForBackgroundJavaScript(50000000);
string pageAsXml = page.AsXml();
The result: https://pastebin.com/E5uXfUZ1
As you can see the javascript wasn't processed.
Please confirm that it's impossible to process such scripts via NHtmlUnit or point me out how to fix the issue.
Metadata
Metadata
Assignees
Labels
No labels