MinkSelenium2Driver
MinkSelenium2Driver copied to clipboard
Add support to get Selenium version and browser name
Closes #228
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.
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.
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.