Skip to content

Instantly share code, notes, and snippets.

@soulgalore
Last active January 26, 2022 23:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soulgalore/a5478a1cc9937b19383f233443c1ce3f to your computer and use it in GitHub Desktop.
Save soulgalore/a5478a1cc9937b19383f233443c1ce3f to your computer and use it in GitHub Desktop.
Run Safari on iOS using Selenium
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