Selenium is now supported in .Net Core 2.0 Preview 2 with Visual Studio 2017 15.3
Karthik kk
In this article we will talk about running Selenium test with .Net core 2.0 Preview 2 using Visual Studio 2017 15.3
I am very happy and excited to write this article, since many of automation testers like you and me were waiting for this news and its finally happening !
Here is the System Requirement for running Selenium with .Net core
Once installed, you need to follow following steps
Step 1
Create new Unit Test Project for .Net Core
Step 2
Add following Nuget references to the project
And it looks something like this
Step 3
Finally write the following code and its available GitHub here
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
IWebDriver driver = new ChromeDriver(@"C:\Users\Karthik\source\repos\SeleniumWithCore2\SeleniumWithCore2\bin\Debug\netcoreapp2.0\");
driver.Navigate().GoToUrl("http://executeautomation.com");
Console.WriteLine("Test Completed !!!");
}
}
You can watch the complete discussion in the video below
Thanks for reading the post and watching the video!!!
Please leave your comments and let me know if there is anything I should update in this post.
Thanks,
Karthik KK