MinkSelenium2Driver icon indicating copy to clipboard operation
MinkSelenium2Driver copied to clipboard

Add support to get Selenium version and browser name

Open rajeshtaneja opened this issue 9 years ago • 3 comments

Closes #228

rajeshtaneja avatar Feb 08 '16 08:02 rajeshtaneja

The driver is called by Mink. These methods won't do any good for Mink.

The only use case I can imagine is that:

  • driver is created somewhere else
  • inside the test you need to detect which browser and Selenium server versions are used and do different things

If I'm correct, then by doing so you're forcing yourself to use Selenium Mink driver in the future as well.

aik099 avatar Feb 08 '16 08:02 aik099

I am planning to use this in beforeScenario for the first JS session to check if selenium version is greater then the supported version. $context->getSession()->getDriver()->getSeleniumVersion();

This is only used for putting the information using custom formatter.

rajeshtaneja avatar Feb 08 '16 09:02 rajeshtaneja

The getBrowserName function however is interesting one. Maybe it makes sense to add to DriverInterface, because other non-headless drivers might implement it as well. For example Sahi.

aik099 avatar Feb 08 '16 09:02 aik099