Using Selenium Webdriver and Safari
I am working on Selenium Webdriver C # using Visual Studio Express 2012.
I have installed the latest Safari browser and I am creating a developer certificate for an extension from Apple and I built the extension and installed it.
But even after that, I cannot send the url to the browser. The browser starts up successfully, but after that I didn't get any logs.
Error message:
Additional information: Failed to get connection with Safari extension. Make sure it is installed correctly and is the correct version.
The code I'm using:
IWebDriver driver = new SafariDriver();
driver.Navigate().GoToUrl("http://www.google.com");
Safaris cannot connect to the server. Please help me, thanks.
source to share
I am writing tests in C # in Visual Studio using NUnit and Selenium test framework for web browser automation.
Try using Selenium 2.45.0
I started using versions 2.49.0 of 'Selenium WebDriver' and 'Selenium WeDriver Support Classes' (installed via NuGet in Visual Studio). It won't work when trying to control Safari, but did work with other browsers (Chrome, Firefox and IE).
I decided to change the Selenium version I was using to 2.45.0 because it mentions here that "... Since Selenium 2.45.0, you must manually install the SafariDriver browser extension ...". I figured 2.45.0 would be a better place to start.
It worked.
So the complete procedure is:
- Open and install SafariDriver.safariextz version 2.45 in Safari browser.
- Make sure you are using Selenium WebDriver 2.45.0 and Selenium WebDriver 2.45.0 support classes in Visual Studio
- Running tests
To change the Selenium version in Visual Studio:
- Instruments
- NuGet Package Manager
- PackageManager Console (will open a console window)
- Type: Install-Package Selenium.Support -Version 2.45.0 (this should also change Selenium WebDriver to version 2.45.0)
- For more information on the PackageManager console: http://docs.nuget.org/consume/package-manager-console
source to share
I am also looking for an answer to this question. From what I was looking for you will need to install an extension for your safari browser in order for it to communicate with selenium .... but as far as I searched I have not found a successful way to do this. So I end up forgetting the safari selenium test and just went with the others (chrome, firefox, i.e. And opera (with limited support too, you can't maximize it at the moment)). It seems that the support for salane in selenium has not yet been implemented successfully and is still experimental. I am currently using the newest I think selenium 2.29
This is more of a comment than an answer, I think the point is that I just want to share with you what I experienced. But if you find a way to do a selenium safari test, please tell me. Thanks to
source to share