Last active
January 26, 2022 23:58
-
-
Save soulgalore/a5478a1cc9937b19383f233443c1ce3f to your computer and use it in GitHub Desktop.
Run Safari on iOS using Selenium
This file contains hidden or 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