Wednesday 12 February 2020

macOS - Safari browser : selenium setup

Install Java
Install Eclipse
Install TestNg
Create Maven project - add selenium-java & TestNG dependencies

1. Open Safari Browser and look out for Develop Menu
     if you do not found Develop menu , you had to enable it by following below step
     Safari->Preferences -> Advanced Tab -> Select 'Show Develop menu in menu bar'
2. Develop menu -> Allow Remote Automation

Thats all - Here is the Program for safari'

        @Test
public void m1(){
System.out.println("test");
WebDriver driver = new SafariDriver();
driver.get("http://www.facebook.com");

}

Run it

To summarise, we do not need any driver.exe file needs to be downloaded
and configured!

No comments:

Post a Comment