Webdriver Safari support on MAC (C#)

713 views
Skip to first unread message

anu

unread,
Feb 10, 2011, 1:28:19 PM2/10/11
to Selenium Users
Hi All,

I wanted to test my website using webdriver(C#) on safari over Mac OSX
but seems it seems to be a distant dream.

First of all a very basic question, i.e. can we use Selenium 2 for
safari as I cant see any safaridriver for it? Many place its mentioned
that we can use chromedriver to test safari, but I could not find any
proper example. Can we set safari browser location and try through
chromedriver.

I tried experimenting around and could come up with following piece of
code. But here also I got an error that it cant resolve
SeleneseCommandExecuter. This class seems to be there for Java but not
for C#.

using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Internal;
............

IWebDriver driver;
ICapabilities capabilities = new DesiredCapabilities("safari",
string.Empty, new Platform(PlatformType.MacOSX));
ICommandExecutor executor = new
SeleneseCommandExecutor("http:localhost:4444/", "http://
www.google.com/", capabilities);
driver = new RemoteWebDriver(executor, capabilities);


May some one kindly help me in figuring out error in above code or
helping me out in running test for safari on mac. Any help will really
mean a lot

Thanks
Anu

Jason Corbett

unread,
Feb 10, 2011, 1:57:49 PM2/10/11
to seleniu...@googlegroups.com
When they say you can use chrome driver to test safari, that means that Chrome is based on webkit, and so is Safari.  The difference is the javascript toolkits used (Chrome uses V8, Safari uses webkit's default one).  So if your website works well in Chrome, it will probably work well in Safari.

There is no working Safari Driver on mac right now, unfortunately.

Jason Corbett


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Robert Wilson

unread,
Sep 18, 2013, 9:29:07 AM9/18/13
to seleniu...@googlegroups.com
I am new to Selenium.  I am attempting to understand what languages I can use. Specifically, can I use C# and still run tests on Safari, Chrome, and Firefox on OS X?

Thanks.

Krishnan Mahadevan

unread,
Sep 19, 2013, 10:39:26 PM9/19/13
to seleniu...@googlegroups.com
Robert,
Isn't C# supposed to run only on a Windows platform ? So I don't think you can make use of C# to write tests and run them locally from OS X.

But that being said you can circumvent around this by following one of the below:

  1. Use Virtual Box and setup a Windows VM. Now within the Windows VM you can setup your C# dev environment and run tests from within it [ I recently saw Jim Evans the owner of InternetExplorer Driver code state that this is how he has been working ]
  2. Get hold of a WINDOWS machine and kick off tests in the Grid mode against the Safari, Chrome, Firefox browsers running on the OS X.


Thanks and Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

Robert Wilson

unread,
Feb 3, 2015, 1:45:30 AM2/3/15
to seleniu...@googlegroups.com
Thanks for the update.  I have both VMWare Fusion and Parallels with Windows 8.1 in one and Windows 7 in the other.  I do most of my work in the VM's.

Thanks,
Robert


Thanks,
Robert Wilson
301-807-6859
wils...@gmail.com


--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/aEe_z46qXN4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

Serguei Kouzmine

unread,
Feb 3, 2015, 8:18:52 AM2/3/15
to seleniu...@googlegroups.com
Hello

You certainly can run Selenium C# client code from Windows via hub , note you have to provide an explicit  browser argument when running the node
81.png
82.png
Reply all
Reply to author
Forward
0 new messages