MarketSquare / robotframework-seleniumlibrary-java

Java port of the Python based SeleniumLibrary for Robot Framework
Apache License 2.0
23 stars 16 forks source link

The Java library is not compatible with the pure Python variant #50

Open gpaulissen opened 6 years ago

gpaulissen commented 6 years ago

For instance the Open Browser Java variant has as arguments:

The Python variant:

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.

Hi-Fi commented 6 years ago

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).