What is the procedure to start Safari browser?



  • I'm new & started working on selenium from last month. I was successfully running script on FF & chrome. but when I started to run same script on Win safari It gives browser initilization error.
    what should I do for launching SafariDriver on Windows?



  • Launching Safari browser is very easy, just you have to add safariDriver jar in your Windows Safari browser. Check after installation whether this icon is displayed or not?

    enter image description here

    If Yes then it will work.
    Steps-
    Requirements: Safari Browser installed Selenium WebDriver
    Now we have to install SafariDriver extension with below steps.
    Manually install the latest Safari extension:

    Download Safari Driver jar from here.
    Rename the file to a .zip file instead of a .jar file – Unzip it (just double click on it to do so).
    In Folder, go to ../selenium-safari-driver-2.43.1/org/openqa/selenium/safari.
    Double click “SafariDriver.safariextz” or simple drag this file in browser.

    WebDriver driver = new SafariDriver();
    driver.get("Url");
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2