Launch Safari Browser for Selenium

This post is for MAC Users to launch Safari Browser using Selenium Webdriver Script and some setting in Mac-Safari Browser.

First Step: – To add safari extension for selenium.
1. Go to Selenium Download page.
2. Download Latest Release of the extension.
Safari Extension for Selenium
3. Go to downloaded file “SafariDriver.safariextz” and click file then click Trust.

Now you are completed with the First Step.

Second Step: – Need to Enable “Allow Remote Automation”
1. Click Safari (at the top right text beside apple icon).
2. Select “Preferences” from drop down links.
3. On Preferences Window, Go to “Advanced” tab.
4. Check option “Show Develop menu in menu bar”.
5. You can see that a Develop menu link will be added in the menu links at the top for Safari Browser.
6. Click “Develop” Menu link.
7. Select “Allow Remote Automation” option under “Develop” menu link.

Note:
1. If you will not check this option then selenium script will throw an error.
2. There might be a pop-up will display when script will launch safari to ask you to Continue Session, so select the Continue Session option to run the program.

You may also like...

Leave a Reply

Your email address will not be published.