1

My application is developed using .Net and now I need to automate this application using Selenium.

So, please guide me which Selenium jar and IDE I have to use to do automation. I know, for Java application I will use Eclipse and Selenium Java jars.

So can use Eclipse with Selenium C# jars for my .Net application?

2 Answers 2

1

You could, but you shouldn't. You can just create tests in Visual Studio.

Just use the Selenium NuGet packages and write the tests in C#. This beats having two development envs, one for the app and one for the tests.

Here is an getting started guide: http://automatetheplanet.com/getting-started-webdriver/

Or this older one without the NuGet package, but the dotnet download from SeleniumHQ: http://james-prescott.com/2014/02/01/tutorial-setting-up-selenium-webdriver-visual-studio/

5
  • What is NuGet, Will it allow to develop tests in C# without using Visual Studio. since we don't have Visual Studio.our counter party wants to use open source tools. but Visual Studio is not open source IDE. is there any alternative source to develop test in C# if not support NuGet.
    – Kanna
    Jul 31, 2015 at 9:22
  • NuGet (nuget.org) is a package manager for Visual Studio. Without Visual Studio its VERY HARD to write code and or tests in C#. Microsoft has a free version Visual Studio Express (visualstudio.com/en-us/products/visual-studio-express-vs.aspx) you should be able to write Selenium C# tests with that version. If you want to use an open source IDE, better write the tests in Java, but then you should also use the Java jars. Selenium is language in-depended, it just connects to a website, it does not matter in what language the website was developed Jul 31, 2015 at 9:41
  • Thanks Van, you mean ,I can run my tests on .Net application by writing tests in java code using Eclipse with selenium java jars instead of using selenium C# jars(for .Net). what i understood from you, using java jars and eclipse we can develop and run test cases on any technology application(ex: java,.Net,...)
    – Kanna
    Jul 31, 2015 at 9:43
  • Correct. You can write Selenium tests in Java, C#, JavaScript, Ruby or Python. These tests can connect to any website and test its behavior. In which language the Website is developed is irrelevant for Selenium, because it tests the HTML, CSS and DOM. It is unaware of the back-end that generates the website, since it only interacts with the end result in the browser. Jul 31, 2015 at 9:47
  • Thank you Van, its really useful and You Make My Day Is Happy.I was in assumption for .net application ...C# jars....now i am clear ..once again thank you.
    – Kanna
    Jul 31, 2015 at 10:04
1

What I'm getting from your description of problem is that you have a website developed in C# and need to test it. If you're thinking of writing tests, using Selenium, then it shouldn't matter which language your website is developed.

You can have a website developed in C# and still use Python/Java code to write Selenium scripts and then test it.

This is one of the best features of this tool.

So you can use the latest version of any IDE (Eclipse, PyCharm), use the Selenium bindings ( Java jars for Eclipse, Python bindings for Pycharm), and start writing your test cases.

So answer to your question :

You can't use C# Selenium bindings in Eclipse, but you can use Java jars in Eclipse, to test your website, which is developed in C#. However if you want to still use C# to write test cases, then you can use C# bindings in Visual Studio to do so (I think Niels has explained it in detail).

2
  • Good answer, but just for the record you can develop C# without Visual Studio and it should be possible to configure Eclipse to build and run C# code. stackoverflow.com/questions/18286855/… But this is not a path I would persue :) Jul 31, 2015 at 10:45
  • Thank you Geeko, really worth to understand selenium behavior on different applications.
    – Kanna
    Jul 31, 2015 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.