public WebDriver(TestConfig config, string feature, string scenario, string[] tags, string driverPath = null)
 {
     BaseUrl = config.AppUrl;
     _driver = WebDriverFactory.Build(config, feature, scenario, tags, driverPath);
     _driver.Manage().Window.Maximize();
 }
        /// <summary>
        /// Builds the web driver instance with given configuration
        /// </summary>
        /// <param name="config">Test configuration</param>
        /// <param name="fearure">Name of the feature being executed</param>
        /// <param name="scenario">Name of the scenario being executed</param>
        /// <param name="tags">List of tags</param>
        /// <returns></returns>
        public static IWebDriver Build(TestConfig config, string fearure, string scenario, string[] tags, string driverPath)
        {
            libPath = string.IsNullOrWhiteSpace(driverPath) ? Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) : driverPath;

            return(config.IsRemote ? GetRemoteDriver(config, fearure, scenario, tags) : GetLocalDriver(config));
        }