Open kgibb opened 3 years ago
The validator could be updated to accept version strings (x.y.z.w) rather than only simple numbers.
browserVersion
is defined as a string identifier in the spec. Is there any value in validating the version considering the varying values supported by drivers/services? e.g. latest
, latest-1
, 86
, 86.0b5
, 87.0.4280.66
, insider preview
....
The validation could be relaxed. The core issue is just that local selenium grids weren't considered when the resolution code was written. Cloud services were the prime driver of the version resolution code, and they all support abbreviated versions (e.g., 87
rather than 87.0.4280.66
).
Regarding browserVersion
being a string, I'd assume that's because standard version numbers like '87.0.4280.66' have to be represented using strings, not because versions should allow arbitrary strings. I think 'latest' and 'insider preview' are the only atypical version numbers I've seen.
SauceLabs support a latest-n
convention, n being the number of releases before the latest version.
Yeah, that's where Intern's 'latest' alias support came from. Intern just lets that version style be applied to other cloud services as well. A similar thing could be done with a selenium grid since Selenium provides an endpoint to retrieve all the available browsers supported by the grid.
Expected behavior
Pin a particular browser version on a remote Selenium grid.
Current behavior
Setting to "87" throws an error on the grid as it is not an exact match.
Possible solution
Remove number validation if it is not necessary for other services. https://github.com/theintern/intern/blob/a3b9643d43989d586dafc264200508ab96e65dfa/packages/core/src/lib/resolveEnvironments.ts#L169
Intern: 4.8.4