Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference with HtmlUnit while mathjax script processing #32

Open
ars18wrw opened this issue May 8, 2018 · 1 comment
Open

Difference with HtmlUnit while mathjax script processing #32

ars18wrw opened this issue May 8, 2018 · 1 comment

Comments

@ars18wrw
Copy link

ars18wrw commented May 8, 2018

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.

@asbjornu
Copy link
Member

I wouldn't expect this project to receive an update before IKVM is ported to .NET Core. See #35 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants