// Licensed to the Software Freedom Conservancy (SFC) under one1// or more contributor license agreements. See the NOTICE file2// distributed with this work for additional information3// regarding copyright ownership. The SFC licenses this file4// to you under the Apache License, Version 2.0 (the5// "License"); you may not use this file except in compliance6// with the License. You may obtain a copy of the License at7//8// http://www.apache.org/licenses/LICENSE-2.09//10// Unless required by applicable law or agreed to in writing,11// software distributed under the License is distributed on an12// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY13// KIND, either express or implied. See the License for the14// specific language governing permissions and limitations15// under the License.1617use crate::common::{assert_browser, assert_driver, exec_driver, get_selenium_manager};1819use rstest::rstest;20use std::env::consts::OS;2122mod common;2324#[rstest]25#[case("chrome", "ChromeDriver")]26#[case("edge", "Microsoft Edge WebDriver")]27#[case("firefox", "geckodriver")]28#[case("iexplorer", "IEDriverServer")]29fn exec_driver_test(#[case] browser_name: String, #[case] driver_name: String) {30let mut cmd = get_selenium_manager();31cmd.args(["--browser", &browser_name, "--output", "json"])32.assert()33.success()34.code(0);3536if (browser_name.eq("iexplorer") && OS.eq("windows"))37|| (!browser_name.eq("iexplorer") && !OS.eq("windows"))38{39assert_driver(&mut cmd);40assert_browser(&mut cmd);41let output = exec_driver(&mut cmd);42assert!(output.contains(&driver_name));43}44}454647