ElBandido
ElBandido

Reputation: 65

NUnit Chrome Driver without path

I am creating Selenium test using Chrome Driver. To run test on my machine, I run Chrome Driver from the path in my computer like,

Instance = new ChromeDriver(@"C:\Users\..\);

But the point is, if somebody want to run my test using NUnit, it doesn't work because the path of the Driver is the one associated to my machine no to the machine that the other person is using. So, is it possible somehow to attach the Driver to the project without writing path and be able to run in all machines without changing anything?

Upvotes: 0

Views: 590

Answers (1)

vins
vins

Reputation: 15370

I have not used NUnit. But I understand your issue & This is how i do.

I use TestNG framework to run my selenium-webdriver regression scripts. I run the scripts periodically using jenkins in different slave machines (windows/mac). Chrome and IE driver servers are part of my project. (i just added to my project folder). I find the absolute path to these drivers @ runtime and use it to start the service. So this way it does NOT depend on the machines or users who runs it. It works great. I would suggest you the same!

Upvotes: 1

Related Questions