MarketSquare / robotframework-seleniumlibrary-java

Java port of the Python based SeleniumLibrary for Robot Framework
Apache License 2.0
23 stars 16 forks source link

Why htmlunit/htmlunitwithjs support has been removed (silently)? #79

Closed php-coder closed 5 years ago

php-coder commented 5 years ago

I'm confused that it isn't supported anymore and I'm wondering what was the reason? Also, what should be used instead?

Thank you!

Hi-Fi commented 5 years ago

It was removed at 5f0025d. I think it had something to do with the support in Selenium itself, but have to check.

I'm currently using jBrowser by default, as that seems to be working as real browser.

I think reason was deprecation notice, and that was marked as deprecated in https://github.com/Hi-Fi/robotframework-seleniumlibrary-java/releases/tag/3.14.0.0

php-coder commented 5 years ago

the support in Selenium itself

The driver development has been moved to a separate repo (https://github.com/SeleniumHQ/htmlunit-driver) and the versions are aligned with htmlunit. Also, I see that htmlunit developer is supporting this driver that is good.

How hard is to support it? Should I expect that it gets back? :)

Hi-Fi commented 5 years ago

It's not hard, there's just 'copy-paste' to add that back. Longest time is probably needed for Maven Central to make sync with release.

Hi-Fi commented 5 years ago

@php-coder I think you know HTMLUnit better than me, and can tell if there's an issue with code that makes Robot tests fail. Or is is functioning as should, and HTMLUnit doesn't like to open URLs with "#".

Error thrown is:


Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
Driver info: driver.version: HtmlUnitDriver```
php-coder commented 5 years ago

I couldn't answer to the question, unfortunately. Is it a full error message? It looks very short..

Or is is functioning as should, and HTMLUnit doesn't like to open URLs with "#".

@rbri Hi, if you is able to help, we would appreciate it!

Hi-Fi commented 5 years ago

Full stack trace of that issue error I got for those tests mentioned.

java.lang.RuntimeException: 
    at org.robotframework.javalib.library.AnnotationLibrary.retrieveInnerException(AnnotationLibrary.java:148)
    at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:130)
    at robot.model.testcase$py.visit$7(C:\Users\user\git\robotframework\build\Lib\robot\model\testcase.py:74)
    at robot.model.testcase$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\testcase.py)
    at robot.model.itemlist$py.visit$11(C:\Users\user\git\robotframework\build\Lib\robot\model\itemlist.py:71)
    at robot.model.itemlist$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\itemlist.py)
    at robot.model.visitor$py.visit_suite$2(C:\Users\user\git\robotframework\build\Lib\robot\model\visitor.py:88)
    at robot.model.visitor$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\visitor.py)
    at robot.model.testsuite$py.visit$19(C:\Users\user\git\robotframework\build\Lib\robot\model\testsuite.py:168)
    at robot.model.testsuite$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\testsuite.py)
    at robot.model.itemlist$py.visit$11(C:\Users\user\git\robotframework\build\Lib\robot\model\itemlist.py:71)
    at robot.model.itemlist$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\itemlist.py)
    at robot.model.visitor$py.visit_suite$2(C:\Users\user\git\robotframework\build\Lib\robot\model\visitor.py:88)
    at robot.model.visitor$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\visitor.py)
    at robot.model.testsuite$py.visit$19(C:\Users\user\git\robotframework\build\Lib\robot\model\testsuite.py:168)
    at robot.model.testsuite$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\testsuite.py)
    at robot.model.itemlist$py.visit$11(C:\Users\user\git\robotframework\build\Lib\robot\model\itemlist.py:71)
    at robot.model.itemlist$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\itemlist.py)
    at robot.model.visitor$py.visit_suite$2(C:\Users\user\git\robotframework\build\Lib\robot\model\visitor.py:88)
    at robot.model.visitor$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\visitor.py)
    at robot.model.testsuite$py.visit$19(C:\Users\user\git\robotframework\build\Lib\robot\model\testsuite.py:168)
    at robot.model.testsuite$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\model\testsuite.py)
    at robot.run$py.main$3(C:\Users\user\git\robotframework\build\Lib\robot\run.py:448)
    at robot.run$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\run.py)
    at robot.utils.application$py._execute$10(C:\Users\user\git\robotframework\build\Lib\robot\utils\application.py:94)
    at robot.utils.application$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\utils\application.py)
    at robot.utils.application$py.execute_cli$5(C:\Users\user\git\robotframework\build\Lib\robot\utils\application.py:49)
    at robot.utils.application$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\utils\application.py)
    at robot.run$py.run_cli$7(C:\Users\user\git\robotframework\build\Lib\robot\run.py:488)
    at robot.run$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\run.py)
    at robot.jarrunner$py._run$3(C:\Users\user\git\robotframework\build\Lib\robot\jarrunner.py:64)
    at robot.jarrunner$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\jarrunner.py)
    at robot.jarrunner$py.run$2(C:\Users\user\git\robotframework\build\Lib\robot\jarrunner.py:57)
    at robot.jarrunner$py.call_function(C:\Users\user\git\robotframework\build\Lib\robot\jarrunner.py)
    at org.robotframework.RobotRunner.run(RobotRunner.java:74)
    at org.robotframework.RobotFramework.run(RobotFramework.java:61)
    at org.robotframework.mavenplugin.AcceptanceTestMojo.executeRobot(AcceptanceTestMojo.java:73)
    at org.robotframework.mavenplugin.AcceptanceTestMojo.subclassExecute(AcceptanceTestMojo.java:68)
    at org.robotframework.mavenplugin.AbstractMojoWithLoadedClasspath.execute(AbstractMojoWithLoadedClasspath.java:53)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: com.github.markusbernhardt.seleniumlibrary.SeleniumLibraryFatalException: org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: identifier is a reserved word: class (https://interactive-examples.mdn.mozilla.net/js/editor-tabbed.js#1)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'user-DESKTOP', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
Driver info: driver.version: HtmlUnitDriver
    at com.github.markusbernhardt.seleniumlibrary.keywords.BrowserManagement.openBrowser(BrowserManagement.java:221)
    at org.robotframework.javalib.reflection.KeywordInvoker.invoke(KeywordInvoker.java:50)
    at org.robotframework.javalib.beans.annotation.AnnotationKeywordExtractor$1.execute(AnnotationKeywordExtractor.java:62)
    at org.robotframework.javalib.library.KeywordFactoryBasedLibrary.runKeyword(KeywordFactoryBasedLibrary.java:37)
    at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:128)
    ... 208 more
Caused by: org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: identifier is a reserved word: class (https://interactive-examples.mdn.mozilla.net/js/editor-tabbed.js#1)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'user-DESKTOP', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
Driver info: driver.version: HtmlUnitDriver
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:722)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$get$8(HtmlUnitDriver.java:687)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$runAsync$0(HtmlUnitDriver.java:429)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.gargoylesoftware.htmlunit.ScriptException: identifier is a reserved word: class (https://interactive-examples.mdn.mozilla.net/js/editor-tabbed.js#1)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:885)
    at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:617)
    at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:534)
    at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.callSecured(HtmlUnitContextFactory.java:336)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:716)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:682)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:104)
    at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1094)
    at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:980)
    at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:373)
    at com.gargoylesoftware.htmlunit.html.HtmlScript$2.execute(HtmlScript.java:247)
    at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:268)
    at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:798)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:754)
    at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1175)
    at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1115)
    at net.sourceforge.htmlunit.cyberneko.filters.DefaultFilter.endElement(DefaultFilter.java:219)
    at net.sourceforge.htmlunit.cyberneko.filters.NamespaceBinder.endElement(NamespaceBinder.java:303)
    at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126)
    at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2075)
    at net.sourceforge.htmlunit.cyberneko.HTMLScanner.scanDocument(HTMLScanner.java:922)
    at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:438)
    at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:389)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:997)
    at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:252)
    at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:196)
    at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268)
    at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:159)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:531)
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:398)
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:315)
    at com.gargoylesoftware.htmlunit.html.BaseFrameElement.loadInnerPageIfPossible(BaseFrameElement.java:189)
    at com.gargoylesoftware.htmlunit.html.BaseFrameElement.loadInnerPage(BaseFrameElement.java:124)
    at com.gargoylesoftware.htmlunit.html.HtmlPage.loadFrames(HtmlPage.java:1908)
    at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:251)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:538)
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:398)
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:315)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:704)
    ... 5 more
Caused by: net.sourceforge.htmlunit.corejs.javascript.EvaluatorException: identifier is a reserved word: class (https://interactive-examples.mdn.mozilla.net/js/editor-tabbed.js#1)
    at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory$HtmlUnitErrorReporter.error(HtmlUnitContextFactory.java:420)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.addError(Parser.java:259)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.reportError(Parser.java:327)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.reportError(Parser.java:314)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.primaryExpr(Parser.java:3192)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2749)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2643)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2564)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2548)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2529)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2504)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2476)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2465)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2454)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2443)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2432)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2421)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2385)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2341)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2364)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.expr(Parser.java:2320)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.nameOrLabel(Parser.java:2069)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statementHelper(Parser.java:1271)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statement(Parser.java:1135)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.parseFunctionBody(Parser.java:772)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.function(Parser.java:942)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.primaryExpr(Parser.java:3117)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2749)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2643)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2564)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2548)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2529)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2504)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2476)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2465)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2454)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2443)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2432)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2421)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2385)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2341)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.arrayLiteral(Parser.java:3316)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.primaryExpr(Parser.java:3121)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2749)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2643)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2564)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2548)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2529)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2504)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2476)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2465)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2454)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2443)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2432)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2421)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2385)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2341)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.plainProperty(Parser.java:3713)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.objectLiteral(Parser.java:3613)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.primaryExpr(Parser.java:3125)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2749)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2643)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2564)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2548)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2529)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2504)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2476)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2465)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2454)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2443)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2432)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2421)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2385)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2341)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.argumentList(Parser.java:2716)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.memberExprTail(Parser.java:2866)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2785)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2643)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2564)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2548)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2529)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2504)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2476)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2465)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2454)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2443)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2432)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2421)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2385)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2341)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.expr(Parser.java:2329)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statementHelper(Parser.java:1281)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statement(Parser.java:1135)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.parse(Parser.java:672)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.parse(Parser.java:593)
    at net.sourceforge.htmlunit.corejs.javascript.Context.parse(Context.java:2647)
    at net.sourceforge.htmlunit.corejs.javascript.Context.compileImpl(Context.java:2593)
    at net.sourceforge.htmlunit.corejs.javascript.Context.compileString(Context.java:1584)
    at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory$TimeoutContext.compileString(HtmlUnitContextFactory.java:222)
    at net.sourceforge.htmlunit.corejs.javascript.Context.compileString(Context.java:1573)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$1.doRun(JavaScriptEngine.java:707)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:870)
    ... 45 more

Also execution with HTMLUnit is quite verbose, e.g. JS errors etc.

rbri commented 5 years ago

Will have a look...

Hi-Fi commented 5 years ago

This can be reproduced by running mvn clean verify -Pbuild,htmlunitwithjs with addHtmlUnitBack -branch.

rbri commented 5 years ago

Sorry but i'm not familiar with your whole staff... What i have done:

Cookie with name __atuvc not found. Testsuites.UnitTests.WhatAreCookies | FAIL | 1 critical test, 0 passed, 1 failed 1 test total, 0 passed, 1 failed

This and the output in htmlunitwithjs_log.html looks like the problem is with the WhatAreCookies test.

Now i need our help - for me it looks like the test tries to open http://www.whatarecookies.com/cookietest.asp. But i can't open this url in my real browser because i always get empty repsonses. Any hint?

php-coder commented 5 years ago

http://www.whatarecookies.com/cookietest.asp. But i can't open this url in my real browser because i always get empty repsonses.

I'm able to open this in Safari. It shows me a page withe the message "Cookies are ENABLED in this browser".

php-coder commented 5 years ago

@rbri Thank you for looking on this!

rbri commented 5 years ago

Have tested this page with Chrome/FF and IE - all with the same result - no response form the server. Any one else?

Hi-Fi commented 5 years ago

@rbri Branch has those tests that I was worried about marked as "non-critical", so those fail without failing the build.

Testsuites                                                            | PASS |
10 critical tests, 10 passed, 0 failed
15 tests total, 10 passed, 5 failed

So as seen, that one cookie test passes for me, but those 5 failing ones are from AW3Schools.

Running just that cqn be quickly done with mvn clean verify -Pbuild,htmlunitwithjs -Dsuites=AW3Schools

Statuses of the tests (on console) show "PASS", because those are non-critical (that's what I did when tests were clearly failing because of browser). But summary and HTML repots show things failing.

rbri commented 5 years ago

BTW: HtmlUnit 2.36.0 is out