As the title says, Intern could be making better use of the standard environments information for local test sessions.
Remote services like BrowserStack use the browser name and version information provided through Intern's environments descriptors to decide what browsers to run and which webdrivers to use. Intern uses the environments information at a coarser level for local tests, mainly to decide which browser to start, and more recently to decide which webdriver(s) to download and use. Intern still requires users to use tunnelOptions if they want to use a non-default version of a webdriver.
Microsoft Edge is particularly problematic because both Chromium Edge and legacy Edge use the name "Microsoft Edge", so simply using the normal browser name doesn't help. The current solution is to require users to provide a browser version of "insider preview" in an environment descriptor, which worked fine during the preview period, but is a bit weird now.
The overall situation could be improved by making better use of environment information for Selenium tunnel, and by being a bit clearer about how Edge is handled.
Browser names with no versions
{ "browserName": "chrome" }
If a browser name is provided with no version, download and use the default driver version for that browser. Intern currently does this, but defaults to legacy Edge for MS Edge. Instead, it should default to current Edge (which is Chromium Edge). To use legacy Edge, users should have to provide a version.
If a browser version is provided (which should match an installed version of the browser), download and use the corresponding driver, or something close. For Chrome and Edge, the driver name corresponds directly to the browser version it's meant to work with. Firefox's geckodriver doesn't change so quickly, but Intern can maintain a mapping of Firefox version ranges to geckodriver versions.
One potential issue is how to handle the case where a user wants a different version of a driver than the "proper" one for their browser version. One option would be to specify an incorrect browser version. Another potential option would be to use intern-specific capabilities, like "intern:chromedriver_version": "0.24.0", to override the normal behavior. If we go with option two, those properties shouldn't be consumed by Intern, not sent on to Selenium.
IE 11
IE 11 is the weird case. It's driver version corresponds to Selenium rather than to the browser, so we should ignore any version information for IE in an environment. The Selenium version is global rather than environment specific, so it should continue to be managed through tunnelOptions.
As the title says, Intern could be making better use of the standard
environments
information for local test sessions.Remote services like BrowserStack use the browser name and version information provided through Intern's
environments
descriptors to decide what browsers to run and which webdrivers to use. Intern uses theenvironments
information at a coarser level for local tests, mainly to decide which browser to start, and more recently to decide which webdriver(s) to download and use. Intern still requires users to usetunnelOptions
if they want to use a non-default version of a webdriver.Microsoft Edge is particularly problematic because both Chromium Edge and legacy Edge use the name "Microsoft Edge", so simply using the normal browser name doesn't help. The current solution is to require users to provide a browser version of "insider preview" in an environment descriptor, which worked fine during the preview period, but is a bit weird now.
The overall situation could be improved by making better use of environment information for Selenium tunnel, and by being a bit clearer about how Edge is handled.
Browser names with no versions
If a browser name is provided with no version, download and use the default driver version for that browser. Intern currently does this, but defaults to legacy Edge for MS Edge. Instead, it should default to current Edge (which is Chromium Edge). To use legacy Edge, users should have to provide a version.
Browser names with versions
If a browser version is provided (which should match an installed version of the browser), download and use the corresponding driver, or something close. For Chrome and Edge, the driver name corresponds directly to the browser version it's meant to work with. Firefox's geckodriver doesn't change so quickly, but Intern can maintain a mapping of Firefox version ranges to geckodriver versions.
One potential issue is how to handle the case where a user wants a different version of a driver than the "proper" one for their browser version. One option would be to specify an incorrect browser version. Another potential option would be to use intern-specific capabilities, like
"intern:chromedriver_version": "0.24.0"
, to override the normal behavior. If we go with option two, those properties shouldn't be consumed by Intern, not sent on to Selenium.IE 11
IE 11 is the weird case. It's driver version corresponds to Selenium rather than to the browser, so we should ignore any version information for IE in an environment. The Selenium version is global rather than environment specific, so it should continue to be managed through
tunnelOptions
.