Warning: fopen(/tmp/SghXTngBZPli-q4xpKT.tmp): failed to open stream: Disk quota exceeded in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 139
Warning: unlink(/tmp/SghXTngBZPli-q4xpKT.tmp): No such file or directory in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 142
Selenium is now supported in .Net Core 2.0 Preview 2 with Visual Studio 2017 15.3
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
Post Author:
Karthik kk
3 Replies to “Selenium is now supported in .Net Core 2.0 Preview 2 with Visual Studio 2017 15.3”
Hi,
Did you try using PageFactory in Dot net core 2.
I am on Core 2.0.2. it doesn’t seem to be working.
Hi,
Did you try using PageFactory in Dot net core 2.
I am on Core 2.0.2. it doesn’t seem to be working.
Thanks,
SS
Yes Sachin, Its not supported yet, I guess it may support started next version, but there is no documentation or news on the same.
Thanks,
Karthik KK
Hi Sachin,
Here is your questions answer https://www.youtube.com/watch?v=xd5TCWmaxGI
Thanks,
Karthik KK