

(Replace ProjectName with your project’s name 🙂 )Ĭlick Run, and if everything went fine you will get the following screen:Īnd voila the testbase is ready for creating some more advanced tests. By default it can be found C:\Users\Username\Documents\Visual Studio 2010\Projects\ProjectName\Projectname\bin\Debug\ProjectName.dll

Click “Open Project” in the File menu, and choose the projects dll file. It is a good practice to check this before any other tests take place, this way you can spare some time during test debugging. The testMethod will only check if we are on the correct page by testing the page title. The timeout should be between 30-60 seconds, depending on your internet connection and on how much js/flash is used on the page. And it will set the default timeout after a page load request. Launch Visual Studio 2019 and then click on Create a new project. Then we must utilize the NUnit framework. We should have Visual Studio 2019 installed in the system along with Selenium webdriver and any browser like Firefox, Chrome, and so on. This code will initialize Webdriver using a Firefox Driver, which means that Firefox will be used to run the test. Selenium Automation Testing Testing Tools. closes every window associated with this driver set the timeout after page load to 30secondsĭriver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 30))

the same way we can setup webDriver to use other browsers When all of this is done we can start to write some simple test code. Open up a new Class Library Project in Visual Studio and add the downloaded Webdriver and NUnit library files to the project. First step is to download the necessary software NUnit and WebDriver:Īnd download the newest Webdriver library from page
