• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • 1.1

      Why should BROWSER=firefox be the default? I do not even have Firefox installed. htmlunit seems the most sensible default: should work on any system, even from CI, without a display.

          [JENKINS-22989] Default value for $BROWSER should be htmlunit

          Ulli Hafner added a comment -

          Hmm, I don't think that htmlunit works at all, since it can't handle java script...

          Ulli Hafner added a comment - Hmm, I don't think that htmlunit works at all, since it can't handle java script...

          Jesse Glick added a comment -

          It handles JavaScript fine in JenkinsRule.

          Jesse Glick added a comment - It handles JavaScript fine in JenkinsRule .

          I don't feel strongly one way or another, as this is just a default value.

          I just thought Firefox was adequate default, because this was an acceptance test and I never fully trusted HtmlUnit's browser emulation.

          Kohsuke Kawaguchi added a comment - I don't feel strongly one way or another, as this is just a default value. I just thought Firefox was adequate default, because this was an acceptance test and I never fully trusted HtmlUnit's browser emulation.

          Ulli Hafner added a comment - - edited

          Did you try to start some acceptance tests with htmlunit? I never got this working so I thought this was just an experiment. I always get an UnsupportedOperationException so I thought JavaScript is not well supported in htmlunit up to now...

          java.lang.UnsupportedOperationException: alert()
          	at org.openqa.selenium.htmlunit.HtmlUnitDriver$HtmlUnitTargetLocator.alert(HtmlUnitDriver.java:1224)
          	at org.jenkinsci.test.acceptance.SanityChecker.afterClickOn(SanityChecker.java:51)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	at org.openqa.selenium.support.events.EventFiringWebDriver$1.invoke(EventFiringWebDriver.java:78)
          	at com.sun.proxy.$Proxy35.afterClickOn(Unknown Source)
          	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:345)
          	at org.jenkinsci.test.acceptance.po.CapybaraPortingLayer.clickButton(CapybaraPortingLayer.java:66)
          	at org.jenkinsci.test.acceptance.po.Jenkins.restart(Jenkins.java:99)
          	at org.jenkinsci.test.acceptance.po.PluginManager.installPlugin(PluginManager.java:121)
          	at org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1.installPlugins(WithPlugins.java:64)
          	at org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1.evaluate(WithPlugins.java:57)
          	at org.jenkinsci.test.acceptance.junit.JenkinsAcceptanceTestRule$1.evaluate(JenkinsAcceptanceTestRule.java:50)
          	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
          	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
          	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
          	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
          

          Ulli Hafner added a comment - - edited Did you try to start some acceptance tests with htmlunit? I never got this working so I thought this was just an experiment. I always get an UnsupportedOperationException so I thought JavaScript is not well supported in htmlunit up to now... java.lang.UnsupportedOperationException: alert() at org.openqa.selenium.htmlunit.HtmlUnitDriver$HtmlUnitTargetLocator.alert(HtmlUnitDriver.java:1224) at org.jenkinsci.test.acceptance.SanityChecker.afterClickOn(SanityChecker.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.openqa.selenium.support.events.EventFiringWebDriver$1.invoke(EventFiringWebDriver.java:78) at com.sun.proxy.$Proxy35.afterClickOn(Unknown Source) at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:345) at org.jenkinsci.test.acceptance.po.CapybaraPortingLayer.clickButton(CapybaraPortingLayer.java:66) at org.jenkinsci.test.acceptance.po.Jenkins.restart(Jenkins.java:99) at org.jenkinsci.test.acceptance.po.PluginManager.installPlugin(PluginManager.java:121) at org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1.installPlugins(WithPlugins.java:64) at org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1.evaluate(WithPlugins.java:57) at org.jenkinsci.test.acceptance.junit.JenkinsAcceptanceTestRule$1.evaluate(JenkinsAcceptanceTestRule.java:50) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

          Jesse Glick added a comment -

          @drulli your 46059c9 shows that this was not JavaScript-related.

          Jesse Glick added a comment - @drulli your 46059c9 shows that this was not JavaScript-related.

          Ulli Hafner added a comment -

          Yes, the alert box thing is not yet supported by htmlunit or phantomjs so I changed that part of the code. But that did not help either, I get none of my tests running using either htmlunit or phantomjs. Seems that a "real" browser is required for our use cases.

          Ulli Hafner added a comment - Yes, the alert box thing is not yet supported by htmlunit or phantomjs so I changed that part of the code. But that did not help either, I get none of my tests running using either htmlunit or phantomjs. Seems that a "real" browser is required for our use cases.

          Jesse Glick added a comment -

          After your fix, all the tests I tried ran fine with BROWSER=htmlunit.

          Jesse Glick added a comment - After your fix, all the tests I tried ran fine with BROWSER=htmlunit .

          Ulli Hafner added a comment -

          Is this still valid?

          Ulli Hafner added a comment - Is this still valid?

          I do not think so.

          Oliver Gondža added a comment - I do not think so.

          Jesse Glick added a comment -

          just fixing Resolution

          Jesse Glick added a comment - just fixing Resolution

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: