public DesiredCapabilities GetCapsFromString(string caps) {
            DesiredCapabilities endCaps = new WebDriverBrowser().GetCapabilitiesForBrowser(browser);
            if(caps=="null") return endCaps;
            string[] capabilities = caps.Split(',');
            foreach (var cap in capabilities)
            {
                string[] toks = cap.Split('=');
                string key = toks[0];
                string value = toks[1];
                endCaps.SetCapability(key,value);
            }
            return endCaps;

        }
示例#2
0
        public void LaunchBrowser()
        {
            if (Config.Settings.runTimeSettings.LaunchBrowser)
            {
                if (Config.Settings.runTimeSettings.RunOnRemoteHost)
                {
                    driver = new WebDriverBrowser().LaunchRemoteBrowser(browser, host);
                }
                else
                {
                    driver = new WebDriverBrowser().LaunchBrowser(browser);
                }

                LogEvent(browser + " Browser Launched");
                testData.actions.addAction(Common.GetCurrentTestName() + " : " + browser + " Browser Launched");
            }
        }
        public DesiredCapabilities GetCapsFromString(string caps)
        {
            DesiredCapabilities endCaps = new WebDriverBrowser().GetCapabilitiesForBrowser(browser);

            if (caps == "null")
            {
                return(endCaps);
            }
            string[] capabilities = caps.Split(',');
            foreach (var cap in capabilities)
            {
                string[] toks  = cap.Split('=');
                string   key   = toks[0];
                string   value = toks[1];
                endCaps.SetCapability(key, value);
            }
            return(endCaps);
        }
 public BrowserInfo(WebDriverBrowser.Browser browser)
 {
     this.browser = browser;
     this.capabilities = new WebDriverBrowser().GetCapabilitiesForBrowser(browser);
 }
 public BrowserInfo(WebDriverBrowser.Browser browser, string capabilities)
 {
     this.browser = browser;
     this.capabilities = GetCapsFromString(capabilities);
 }