Today I want to share with you how to download a project from Github. You can do this with any project, but I specifically want to teach you how to download this Automation Testing framework that I developed. The framework is HERE.
For Visual Studio 2015 (Since the project was coded in VS 2015, importing it into here is the easiest. Another version will have a few extra steps that I will show you all)
- Go to the URL in the search bar. Alternatively, you can also go to “github.com/nadvolod” and then find the project called “LightPomFrameworkTutorial.”
- Click the “Download ZIP” button to download the project.
- This is the .zip file that was downloaded. Go ahead and extract it to a location of your choice.
- Open Visual Studio 2015 as administrator.
- Open the Solution in Visual Studio.
- Go to the location of the extracted files. Open the “LightPomFramework.sln” file from VS. This is the solution file that will load all of the appropriate assets for you to make the automation framework run.
- You might get this security warning. Go ahead and click “OK”. Don’t worry, I’m a trustworthy source and I won’t be sending any viruses haha. You can yell at me if something goes wrong 🙂
- In the Solution Explorer, you should not be able to now see all of the framework assets in all of their glory.
- Build the solution and make sure that everything is okay and there are no errors. Visual Studio will download all of the Nuget packages for you and build the code.
- Here is the output of the build. Success.
- Now try to run the tests, they’re pretty sweet. Oops, you’re going to get an error. See the error below. If you carefully read through it, you will notice that it says, “The file C:\the path where you downloaded the framework\Drivers\chromedriver.exe does not exist”. Do not worry. This is on purpose. The reason that this happened is because I do not want to commit a .exe file or any executable to Source Control (like .dll files).Because these versions can always change, it is not a good idea to commit them to Source Control. I can have version 2.1 now, and in 1 year, you update to the latest version of 3.0. Then you commit your source code. Then I will pull down the code and now I will have 2 versions of the executables in my project, 2.1 and 3.0. Not good. And this causes a lot of trouble. That’s why they call it “.dll hell”. This is also the same reason why we do not commit Nuget package .dlls to Source Control. Something that I teach you in my Selenium Webdriver course.
- Download the latest version of ChromeDriver from this link: http://chromedriver.storage.googleapis.com/index.html. Make sure to select the appropriate version for yourself, depending on your Operating System. I have Windows 10, so I am going to download the Windows zip file.
- Unzip the file. Inside, you will find a piece of gold called chromedriver.exe.
- Move the chromedriver.exe into the Drivers folder of the framework location. Now, it is available for you to use in your tests.
- Rerun the test that failed. And now you should see the test run and pass, depending on the test that you ran. Congratulations, your framework is set up. If you have any questions, ask them in the forum here.