Mojo's Selenium Maven Plugin
  1. Mojo's Selenium Maven Plugin
  2. MSELENIUM-23

browserSessionReuse configuration does not work

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-2
    • Fix Version/s: 1.0-beta-3
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When set to true, selenium:start-server fails. here is the error.

      Caused by: : Java returned: 1
      at org.apache.tools.ant.taskdefs.Java.execute(Java.java:107)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

        Activity

        Hide
        Jason Dillon added a comment -

        Can you give me a log file with -X so I can see what its doing internally please?

        Show
        Jason Dillon added a comment - Can you give me a log file with -X so I can see what its doing internally please?
        Hide
        Dan Tran added a comment -

        below is the selenium log, I also set <alwaysProxy>true</alwaysProxy> per suggestion from the error message, but I think the alwaysProxy is incorrectly configure the mojo

        //////////////////////////////////////////

        11:15:17,868 INFO [org.openqa.selenium.server.SeleniumServer] Writing debug logs to C:\dev\iplocks\va\va-integration\va-it-web\target\selenium\server.log
        11:15:17,868 INFO [org.openqa.selenium.server.SeleniumServer] Java: Sun Microsystems Inc. 1.5.0_11-b03
        11:15:17,868 INFO [org.openqa.selenium.server.SeleniumServer] OS: Windows XP 5.1 x86
        11:15:17,884 INFO [org.openqa.selenium.server.SeleniumServer] v0.9.2 [2007], with Core v0.8.3 [1879]
        11:15:17,884 INFO [org.openqa.selenium.server.SeleniumServer] Will recycle browser sessions when possible.
        -reusingBrowserSessions only valid in combination with -proxyInjectionMode (because of the need for multiple domain support, which only -proxyInjectionMode provides).:
        Usage: java -jar selenium-server.jar [-interactive] [options]

        -port <nnnn>: the port number the selenium server should use
        (default 4444)
        -timeout <nnnn>: an integer number of seconds before we should give
        up
        -interactive: puts you into interactive mode. See the tutorial for
        more details
        -multiWindow: puts you into a mode where the test web site executes
        in a separate window, and selenium supports frames
        -forcedBrowserMode <browser>: sets the browser mode (e.g.
        "*iexplore" for all sessions, no matter what is passed to
        getNewBrowserSession
        -userExtensions <file>: indicates a JavaScript file that will be
        loaded into selenium
        -browserSessionReuse: stops re-initialization and spawning of the
        browser between tests
        -avoidProxy: By default, we proxy every browser request; set this
        flag to make the browser use our proxy only for URLs containing
        '/selenium-server'
        -firefoxProfileTemplate <dir>: normally, we generate a fresh empty
        Firefox profile every time we launch. You can specify a directory
        to make us copy your profile directory instead.
        -debug: puts you into debug mode, with more trace information and
        diagnostics on the console
        -browserSideLog: enables logging on the browser side; logging
        messages will be transmitted to the server. This can affect
        performance.
        -log <logFileName>: writes lots of debug information out to a log
        file
        -htmlSuite <browser> <startURL> <suiteFile> <resultFile>: Run a
        single HTML Selenese (Selenium Core) suite and then exit
        immediately, using the specified browser (e.g. "*firefox") on the
        specified URL (e.g. "http://www.google.com"). You need to specify
        the absolute path to the HTML test suite as well as the path to the
        HTML results file we'll generate.
        -proxyInjectionMode: puts you into proxy injection mode, a mode
        where the selenium server acts as a proxy server for all content
        going to the test application. Under this mode, multiple domains
        can be visited, and the following additional flags are supported:

        -dontInjectRegex <regex>: an optional regular expression that
        proxy injection mode can use to know when to bypss injection
        -userJsInjection <file>: specifies a JavaScript file which will
        then be injected into all pages
        -userContentTransformation <regex> <replacement>: a regular
        expression which is matched against all test HTML content; the
        second is a string which will replace matches. These flags can
        be used any number of times. A simple example of how this could
        be useful: if you add "-userContentTransformation https http"
        then all "https" strings in the HTML of the test application will
        be changed to be "http".

        ///////////////////////////////////////////////////////////////////////////

        when use with <alwaysProxy>true</alwaysProxy>, it got this

        unrecognized argument -alwaysProxy:
        Usage: java -jar selenium-server.jar [-interactive] [options]

        -port <nnnn>: the port number the selenium server should use
        (default 4444)

        Show
        Dan Tran added a comment - below is the selenium log, I also set <alwaysProxy>true</alwaysProxy> per suggestion from the error message, but I think the alwaysProxy is incorrectly configure the mojo ////////////////////////////////////////// 11:15:17,868 INFO [org.openqa.selenium.server.SeleniumServer] Writing debug logs to C:\dev\iplocks\va\va-integration\va-it-web\target\selenium\server.log 11:15:17,868 INFO [org.openqa.selenium.server.SeleniumServer] Java: Sun Microsystems Inc. 1.5.0_11-b03 11:15:17,868 INFO [org.openqa.selenium.server.SeleniumServer] OS: Windows XP 5.1 x86 11:15:17,884 INFO [org.openqa.selenium.server.SeleniumServer] v0.9.2 [2007] , with Core v0.8.3 [1879] 11:15:17,884 INFO [org.openqa.selenium.server.SeleniumServer] Will recycle browser sessions when possible. -reusingBrowserSessions only valid in combination with -proxyInjectionMode (because of the need for multiple domain support, which only -proxyInjectionMode provides).: Usage: java -jar selenium-server.jar [-interactive] [options] -port <nnnn>: the port number the selenium server should use (default 4444) -timeout <nnnn>: an integer number of seconds before we should give up -interactive: puts you into interactive mode. See the tutorial for more details -multiWindow: puts you into a mode where the test web site executes in a separate window, and selenium supports frames -forcedBrowserMode <browser>: sets the browser mode (e.g. "*iexplore" for all sessions, no matter what is passed to getNewBrowserSession -userExtensions <file>: indicates a JavaScript file that will be loaded into selenium -browserSessionReuse: stops re-initialization and spawning of the browser between tests -avoidProxy: By default, we proxy every browser request; set this flag to make the browser use our proxy only for URLs containing '/selenium-server' -firefoxProfileTemplate <dir>: normally, we generate a fresh empty Firefox profile every time we launch. You can specify a directory to make us copy your profile directory instead. -debug: puts you into debug mode, with more trace information and diagnostics on the console -browserSideLog: enables logging on the browser side; logging messages will be transmitted to the server. This can affect performance. -log <logFileName>: writes lots of debug information out to a log file -htmlSuite <browser> <startURL> <suiteFile> <resultFile>: Run a single HTML Selenese (Selenium Core) suite and then exit immediately, using the specified browser (e.g. "*firefox") on the specified URL (e.g. "http://www.google.com"). You need to specify the absolute path to the HTML test suite as well as the path to the HTML results file we'll generate. -proxyInjectionMode: puts you into proxy injection mode, a mode where the selenium server acts as a proxy server for all content going to the test application. Under this mode, multiple domains can be visited, and the following additional flags are supported: -dontInjectRegex <regex>: an optional regular expression that proxy injection mode can use to know when to bypss injection -userJsInjection <file>: specifies a JavaScript file which will then be injected into all pages -userContentTransformation <regex> <replacement>: a regular expression which is matched against all test HTML content; the second is a string which will replace matches. These flags can be used any number of times. A simple example of how this could be useful: if you add "-userContentTransformation https http" then all "https" strings in the HTML of the test application will be changed to be "http". /////////////////////////////////////////////////////////////////////////// when use with <alwaysProxy>true</alwaysProxy>, it got this unrecognized argument -alwaysProxy: Usage: java -jar selenium-server.jar [-interactive] [options] -port <nnnn>: the port number the selenium server should use (default 4444)
        Hide
        Jason Dillon added a comment -

        Hrm... guess the options have changed. I'll see what the latest flags are and update the plugin.

        Show
        Jason Dillon added a comment - Hrm... guess the options have changed. I'll see what the latest flags are and update the plugin.
        Hide
        Jason Dillon added a comment -

        Seems to be working, the problem was with the old alwaysProxy parameter... AFAICT

        Show
        Jason Dillon added a comment - Seems to be working, the problem was with the old alwaysProxy parameter... AFAICT

          People

          • Assignee:
            Jason Dillon
            Reporter:
            Dan Tran
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: