-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
com.gargoylesoftware.htmlunit.ScriptException: Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher #127
Comments
I don't think that this is htmlunit issue: I opened this page in Firefox and it shows the same error. The page loads jquery 1.7.1 while bootstrap requires >= 1.9.1 and that's why it complains. |
Firefox may well show the same error. But, when I open the http://taxtest.navajocountyaz.gov/Pages/WebForm1.aspx?p=1&apn=10301003B page with Firefox, I am able to see the dollar figures under "Cash Value". With HTMLUnit, I am not able to extract such values. So, for this page, HTMLUnit is not performing as well as Firefox. I would like for there to be a way in HTMLUnit to extract those dollar figures from the web page, regardless of the existence of the jQuery error. |
Have done a quick test
Looks like everything is there. Can you please check and provide more details about the missing content. |
I just tried your code, and I am getting the same exception at the
line of code. Maybe the problem is with the HTMLUnit+Dependencies that I downloaded from https://jar-download.com/artifact-search/htmlunit . Maybe the maintainer of jar-download.com got some version(s) of the dependencies wrong. Could you download the 2.37.0 version of HTMLUnit+Dependencies from https://jar-download.com/artifact-search/htmlunit , try your code with it, and see whether it still works ? I know I can also download HTMLUnit from the official site. I used to do that. But then it used to take me forever to track down all the dependencies and the dependencies of the dependencies. So, I would appreciate if you could first try the above hypothesis to see whether or not the problem is with the jar-download.com site. Then, if it is, I will download HTMLUnit from its official site. |
You are sure the code throws the exception? I guess the exception is only in the logs but the code produces some output here. Regarding the download - htmlunit-2.37.0-bin.zip from the official download location contains all you need (including all dependent libs). Do you miss something in this package? |
BTW if you like to ignore the js errors you can use webClient.setJavaScriptErrorListener(new SilentJavaScriptErrorListener()); |
The following import statement:
and adding the following code
did fix the problem. Thank you very much rbri for your help. I am going to close this issue. |
Thanks for the feedback. |
I am trying to browse http://taxtest.navajocountyaz.gov/Pages/WebForm1.aspx?p=1&apn=10301003B using Java code and the latest release of HTMLUnit (version 2.37.0, which I downloaded from https://jar-download.com/artifact-search/htmlunit along with all its dependencies).
The last line of code throws the following exception:
com.gargoylesoftware.htmlunit.ScriptException: Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher (http://taxtest.navajocountyaz.gov/js/bootstrap.js#15)
I thought the problem was with my code. So, I sought help at https://stackoverflow.com/questions/60030255/com-gargoylesoftware-htmlunit-scriptexception-error-bootstraps-javascript-req and, according to RBRi, it "Looks like a problem inside HtmlUnit itself."
Please fix the problem in an upcoming release of HTMLUnit. In the meantime, I would appreciate a workaround for my code, including, if possible, which older release of HTMLUnit I need to revert back to avoid the problem.
Thank you.
The text was updated successfully, but these errors were encountered: