Run Safari on iOS using Selenium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Builder, Capabilities } = require('selenium-webdriver'); | |
(async function example() { | |
const caps = Capabilities.safari(); | |
caps.set('platformName', 'iOS'); | |
const driver = await new Builder() | |
.forBrowser('safari') | |
.withCapabilities(caps) | |
.build(); | |
try { | |
await driver.get('https://www.apple.com'); | |
} finally { | |
await driver.quit(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment