How to execute QAS Project in Safari Browser

Safari Settings

Step 1 : To use Safari, you must also enable the developer menu and enable the Allow Remote Automation option.

Here are the steps.
  • Go to Safari >> Preferences >> Advanced Tab
  • Click on option "Show Develop menu in menu bar"
  • Once you enable it, you will see "Develop" in the Safari Menu
  • Open "Develop" menu and enable "Allow Remote Automation".

Step 2 : Start the driver

  • Go to Finder in Mac
  • Go Tab >> Go to Folder
  • Go to Path - /System/Library/CoreServices/SafariSupport.bundle/Contents/MacOS/
  • This is the default path where safaridriver is present in mac. You will see safari driver.
  • Double click on the driver and you should get the Process Completed output as below.

Step 3 : Enable Safari Driver

  • Go to terminal
  • cd /System/Library/CoreServices/SafariSupport.bundle/Contents/MacOS/
  • safaridriver --enable
  • This will enable the driver for automation.
  • It was ask for password - give your system password

QAS Settings

Step 1 : Application Properties Settings

  • Go to "application.properties"
    • Add - driver.name=safariDriver
    • Add - webdriver.safari.driver=/usr/bin/safaridriver
    • Default the safari webdriver is in "/usr/bin/safaridriver"

Step 2 : Env Properties Settings

  • Go to env.properties 

Step 3 : Execute the Project

  • Go to QAS Terminal and execute "mvn clean test"