本文整理匯總了TypeScript中selenium-webdriver.Capabilities.merge方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Capabilities.merge方法的具體用法?TypeScript Capabilities.merge怎麽用?TypeScript Capabilities.merge使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類selenium-webdriver.Capabilities
的用法示例。
在下文中一共展示了Capabilities.merge方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: TestCapabilities
function TestCapabilities() {
let capabilities: webdriver.Capabilities = new webdriver.Capabilities();
capabilities = new webdriver.Capabilities(webdriver.Capabilities.chrome());
let objCapabilities: any = {};
objCapabilities[webdriver.Capability.BROWSER_NAME] = webdriver.Browser.PHANTOM_JS;
capabilities = new webdriver.Capabilities(objCapabilities);
let anything: any = capabilities.get(webdriver.Capability.SECURE_SSL);
let check: boolean = capabilities.has(webdriver.Capability.SECURE_SSL);
capabilities = capabilities.merge(capabilities);
capabilities = capabilities.merge(objCapabilities);
capabilities = capabilities.set(webdriver.Capability.VERSION, { abc: 'def' });
capabilities = capabilities.set(webdriver.Capability.VERSION, null);
capabilities = capabilities.setLoggingPrefs(new webdriver.logging.Preferences());
capabilities = capabilities.setLoggingPrefs({ key: 'value' });
capabilities = capabilities.setProxy({ proxyType: 'Type' });
capabilities = capabilities.setEnableNativeEvents(true);
capabilities = capabilities.setScrollBehavior(1);
capabilities = capabilities.setAlertBehavior('accept');
anything = capabilities.toJSON();
capabilities = webdriver.Capabilities.android();
capabilities = webdriver.Capabilities.chrome();
capabilities = webdriver.Capabilities.firefox();
capabilities = webdriver.Capabilities.htmlunit();
capabilities = webdriver.Capabilities.htmlunitwithjs();
capabilities = webdriver.Capabilities.ie();
capabilities = webdriver.Capabilities.ipad();
capabilities = webdriver.Capabilities.iphone();
capabilities = webdriver.Capabilities.opera();
capabilities = webdriver.Capabilities.phantomjs();
capabilities = webdriver.Capabilities.safari();
}