robotframework-seleniumlibrary-java icon indicating copy to clipboard operation
robotframework-seleniumlibrary-java copied to clipboard

The Java library is not compatible with the pure Python variant

Open gpaulissen opened this issue 7 years ago • 1 comments

For instance the Open Browser Java variant has as arguments:

  • url
  • browserName=firefox
  • alias=None
  • remoteUrl=None
  • desiredCapabilities=None
  • browserOptions=None

The Python variant:

  • url
  • browser=firefox
  • alias=None
  • remote_url=False
  • desired_capabilities=None

I would like to make my Robot Framework code portable between the Java (Jython) and Python versions but that is difficult when argument names are different. For instance the Python variant uses browser and remote_url instead of browserName and remoteUrl.

gpaulissen avatar Aug 03 '18 08:08 gpaulissen

I think the order of the arguments is same, so without naming the arguments things work.

There's 3 things:

  1. Argument naming (snake-case vs. camelCase): Changing of those can be breaking change for most of the users (if using the argument names and not the order).
  2. Default values: Default values are easily changeable, and both default values are easy to handle.
  3. "Extra options": Selenium offers (at least in Java) browserOptions, that go to actual browser within desiredCapabilities but with just browser specific tag(s). So e.g. for Firefox and Chrome Python version requires 2 set of configs at test case, where Java version can handle with one (because of separation of desiredCapabilities and browserOptions). E.g. http://chromedriver.chromium.org/capabilities.

If first one is the real issue, then also changing of it would be. Last one I think shouldn't be changes, as it makes the "experimental" configurations of browsers harder (or requires to generate e.g. firefox profile beforehand).

Hi-Fi avatar Aug 03 '18 08:08 Hi-Fi