1

I am creating tests using Selenium WebDriver and Visual Studio 2010 for a different amount of projects, verifying elements of webpage (classame, id..).

Some of my developer colleagues are using Mac or they dont want install Visual Studio in their machines. So here is the question, in order to run my created tests (or future ones), there is any way to run them without Visual Studio and in an easy way? Any help or advice appreciated! :D

MAC ERROR

bold 3.12.0/mcs/class/System/System.Net/HttpWebRequest.cs:849 at System.Net.HttpWebRequest.GetRequestStream () [0x00057] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/System/System.Net/HttpWebRequest.cs:865 at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute (OpenQA.Selenium.Remote.Command commandToExecute) [0x00000] in <filename unknown>:0 at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute (OpenQA.Selenium.Remote.Command commandToExecute) [0x00000] in <filename unknown>:0 at OpenQA.Selenium.Remote.RemoteWebDriver.Execute (System.String driverCommandToExecute, System.Collections.Generic.Dictionary2 parameters) 0x00000] in :0

ElBandido
  • 65
  • 2
  • 7
  • Of course, by invoking the test framework outside of VS. I assume you are using MSTest? – Arran Jan 21 '15 at 22:45
  • Right, I did it with NUnit, I change Test for TestFixture and so on and it looks it works. But for Mac as I said before? just with Mono Develop and NUnit both together? thnx Arran – ElBandido Jan 22 '15 at 11:30

1 Answers1

2

Of course it can be accomplished with command line. All you need to do is use NUnit console and reference to the test dll That's how we also run selenium tests on windows machine which do not have VS installed. See this. More about NUnit commmand line options here

Community
  • 1
  • 1
Saifur
  • 16,081
  • 6
  • 49
  • 73
  • Thanks Saifur, yes it looks than only downloading NUnit and reference the dll, it can run. But do you know if it is possible to do it using Mac, not windows not Linux, because on "http://nunit.org/?p=download" just can download .exe files, that are not supported on Mac. Thank you! – ElBandido Jan 22 '15 at 10:58
  • Ya `Mono Develop` is an option – Saifur Jan 22 '15 at 13:08
  • Saifur!!! How I run it in a MAC?? I downloaded Mono Develop (Xamarin Studio) but doesnt work!! chromedriver giving problem, any idea? – ElBandido Feb 20 '15 at 14:21
  • What kind of `exception` you are getting and is that only `Chrome` specific? – Saifur Feb 20 '15 at 14:25
  • I changed my Embedded Resource chromedriver.exe to the one for Mac. I build the p`roject, everything okay. But when I try to run one fo them: – ElBandido Feb 20 '15 at 14:30
  • Please provide me some more details. I currently don't use mac but would love to do some research if I can understand the problem. And, specify if this is chrome specific. – Saifur Feb 20 '15 at 14:33
  • Sorry man, I dont know how this stackoverflow works...Its this question, dont have any idea: [link] (http://stackoverflow.com/questions/28585005/running-selenium-tests-with-xamarin-studion-on-mac) – ElBandido Feb 20 '15 at 14:34
  • You are good. Here is the [markdown editing](http://stackoverflow.com/editing-help). I will look into. – Saifur Feb 20 '15 at 14:37
  • I dont use it neither, but my boss has it and wants to run it by himself..and dont have any idea – ElBandido Feb 20 '15 at 14:37
  • Can you provide me little more info like how you are running the tests? Using `dll`. Is it similar to this [process](http://www.nunit.org/index.php?p=consoleCommandLine&r=2.4.8) – Saifur Feb 20 '15 at 14:45
  • Well, basically I opened the solution in Xamarin Studio in Mac. I reloaded the missed references and then change the "chromedriver.exe" for "chromedriver" (for Mac). I build and 0 Errors, I run one test and...pop up that error. Firewall desactived and so on. For me doesnt matter to run it in Xamarin or wherever. I just want to be able to run the test with other tool or NUnit or whatever could do it. just cant find what and how :( – ElBandido Feb 20 '15 at 14:53