Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

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

Open
gpaulissen opened this issue Aug 3, 2018 · 1 comment
Open

Comments

@gpaulissen
Copy link

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.

@Hi-Fi
Copy link
Collaborator

Hi-Fi commented Aug 3, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants