Пример #1
0
        protected void VersionTest(IDriverConfig driverConfig, string pattern)
        {
            var version = driverConfig.GetDriverVersion("Latest");
            var regex   = new Regex(pattern);
            var match   = regex.Match(version);

            Assert.NotEmpty(version);
            Assert.True(match.Success);
        }
Пример #2
0
        public List <Tuple <string, string> > GetDriverInfo(IDriverConfig browserConfig, Architecture architecture, string browserVersion)
        {
            var baseUrlForSelectedArchitecture = architecture.Equals(Architecture.X32) ? browserConfig.GetUrl32() : browserConfig.GetUrl64();

            browserVersion = browserVersion.Equals("Latest", StringComparison.InvariantCultureIgnoreCase) ? browserVersion : CompatibilityHelper.GetMajorVersion(browserVersion);

            var driverVersion = browserConfig.GetDriverVersion(browserVersion);

            var url = UrlHelper.BuildUrl(baseUrlForSelectedArchitecture, driverVersion);

            var fileAndFolderPath = FileHelper.GetDriverDestination(browserConfig.GetName(), driverVersion, architecture, browserConfig.GetBinaryName());

            List <Tuple <string, string> > driverInfo = new List <Tuple <string, string> >();

            driverInfo.Add(new Tuple <string, string>(url, fileAndFolderPath));

            return(driverInfo);
        }