MarkusBernhardt / robotframework-selenium2library-java

Java port of the Selenium 2 (WebDriver) Python library for Robot Framework
Apache License 2.0
46 stars 51 forks source link

Library not loading with Robot Framework 2.9 #73

Closed Hi-Fi closed 8 years ago

Hi-Fi commented 9 years ago

Tried to change existing tests to use RF 2.9, and got following error:

[ ERROR ] Error in file 'C:\work\testautomation\tests\s2test.txt': Initializing test library 'Selenium2Library' with no arguments failed: maximum recursion depth exceeded (Java StackOverflowError)
Traceback (most recent call last):
  None

I run tests with Gradle, so just changed version of the dependancy in build.gradle.

There're some changes in Python version of library because of RF2.9. Hopefully there's plan to support RF2.9 with this java-version, too.

Tested with simplified case:

*** Settings ***
Library           Selenium2Library

*** Test Cases ***
TEST
    Open Browser    www.google.com    ${BROWSER}
    Capture Page Screenshot
    Close Browser
ali-feint commented 9 years ago

@Hi-Fi how do you run the tests with Gradle?

Hi-Fi commented 9 years ago

Gradle runner: https://gist.github.com/Hi-Fi/f18f40b59d1743e5b284

Hi-Fi commented 9 years ago

Tests are passing. Libdoc fails because robot is not running when libdoc is tried to run.

runOnFailurePythonInterpreter.get().exec(
                    String.format("BIN.run_keyword('%s')",
                            runOnFailureKeyword.replace("'", "\\'").replace("\n", "\\n")));

throws error, which causes code to just stuck in that loop at RunOnFailure.java

ghost commented 8 years ago

Any chance getting the fix merged and released soon?

MarkusBernhardt commented 8 years ago

Will try to look into that in the evening

Am 24.09.2015 um 10:14 schrieb István Rábel notifications@github.com:

Any chance getting the fix merged and released soon?

— Reply to this email directly or view it on GitHub https://github.com/MarkusBernhardt/robotframework-selenium2library-java/issues/73#issuecomment-142851089.

diakula commented 8 years ago

Getting similar error:

 Initializing test library 'Selenium2Library' with no arguments failed: maximum recursion depth exceeded (Java StackOverflowError)

Using robotframework 2.9.1.

jordanwalsh23 commented 8 years ago

Same error on robotframework 2.9.2.

Was there any documented solution to this?

Initializing test library 'Selenium2Library' with no arguments failed: maximum recursion depth exceeded (Java StackOverflowError)

Hi-Fi commented 8 years ago

Yes, error is with all versions of Robot Framework 2.9.x because of breaking changes. Update/fix made already at #74.

Same fixes were also introduced to Python version of Selenium2Library.

Marco85Li commented 8 years ago

Is the fixed/updated release available on maven repositories?

MarkusBernhardt commented 8 years ago

Merged in. Will be released today. THANKS for the fix.