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

Open Browser does not work with 5 args #55

Closed dalewking closed 10 years ago

dalewking commented 10 years ago

If you try to invoke Open Browser with only 5 arguments (omitting the browserOptions arg) it fails with an InvalidArgumentException. For example:

Open Browser  ${url}  ${browser}  ${alias}  ${remoteUrl}  ${capabilities}

causes the error, which occurs when it actually tries to call the openBrowser method.

Oddly, it does work if you only use 4 parameters or if you specify all 6.

I have debugged it and the issue appears to be that this call in KeywordInvoker:

Object[] groupedArguments = createArgumentGrouper().groupArguments(args);

returns an empty string array for that 6th parameter when the method takes a String parameter. When it tries to invoke the method with a String array for the parameter instead of a String you obviously get the exception. I didn't bother trying to figure out the argument Grouper code since I had a workaround to pass all 6 parameters.

penguinho commented 10 years ago

If you can rewrite this file to support this, I'll include it

https://github.com/appium/appium-dot-app/blob/master/Appium/Inspector/Recorder/CodeMaker/Plugins/AppiumCodeMakerJavaPlugin.m

dalewking commented 10 years ago

The previous comment actually belongs in the referenced issue in appium-dot-app project and not on this issue.