Selenium
First Selenium Webdriver Script: JAVA Sample Code Example
Using the Java class "myclass" that we created in the previous tutorial, let us try to create a...
Git Hub is a Collaboration platform. It is built on top of git. It allows you to keep both local and remote copies of your project. A project which you can publish it among your team members as they can use it and update it from there itself.
Advantages of Using Git Hub For Selenium.
In this tutorial, you will learn
Before we start selenium and git hub integration, we need to install the following components.
You can find this installation steps in the following links:
1) Maven and Jenkins installation Guide (https://www.guru99.com/maven-jenkins-with-selenium-complete-tutorial.html)
2) Tomcat Installation Guide (https://www.guru99.com/apache.html)
Now let us start by installing "Git Binaries".
Step 1) Launch the Browser and navigate to URL- https://git-scm.com/
Step 2) Download the latest stable release.
Step 3) Click on downloads for windows once the file is downloaded we can begin with our installation.
Step 4) Go to the download location or icon and run the installer.
Step 5) Click through welcome and General Public license.
Step 6) Click on "next" button in git setup wizard
Step 7) Read the GNU General Public License and click on next
Another window will pop up,
Step 8) In this step,
Step 9) Select the component which you want to install and click on next
Step 10) If you want to create a start menu folder for Git, leave the setting default and click on next.
Step 11) In this step,
Leave the default setting and click on next to install.
Step 12) In this step,
Step 13) In this step,
Step 14) In this step,
Once git is installed successfully, you can access the git.
Open Command prompt and type "git" and hit "Enter" If you see below screen means it is installed successfully
Now let's start with Jenkins Git Plugin Installation.
Step 1) Launch the Browser and navigate to your Jenkins.
Step 2) Click on Manage Jenkins.
Step 3) Click on Manage Plugins, it will open another window
Step 4) Click on Available TAB
Step 5) In this step,
Now it will install the following plugins.
Once the Installation is finished. Restart your Tomcat server by calling the "shutdown.bat" file
After Restarting the tomcat and Jenkins we can see plugins are installed in the "Installed" TAB.
Now let's install GitHub Plugin for Eclipse.
URI for EGit Plugin location https://download.eclipse.org/egit/updates/
Step 1) Launch Eclipse and then
Step 2) The below screen will open once we click on the install new software. Now click on add
Step 3) In this step,
Step 4) Then click on select all and next
Step 5) Click on next and click accept the license agreement then finish the installation.
Then restart the eclipse.
Step 1) Navigate to Git Hub URI: https://github.com/ sign up for git hub
Step 2) Once you have been successfully signed up then click on create new repository
Step 3) In this step,
Step 1) Once we are done with the new repository, Launch Eclipse
Step 2) In this step,
Step 3) In this step,
Step 4) Click on next
Step 5) In this step,
As soon as you click on finish button, a project will be created.
Step 6)
Now let's create a sample script
Let's push the code/local repository to Git Hub.
Step 7) In this step,
Step 8) Once we click on the "Share Project" in above screen, we will get another window
In this step,
Once we click on Finish, we can see the change in the project structure that we have created a local repository.
Now it's time to push our code to Git Hub Repository
Step 9) In this step,
Step 10) In this step,
Once you are done with it, you could see the icons in the project is being changed it says that we have successfully pushed and committed our code to Git Hub
We can verify in the Git hub in the repository that our project is successfully pushed into repository
Now it's time for executing our project from Git Hub in Jenkins
Step 11) Launch browser and open your Jenkins.
Step 12) Click on new Item.
Step 13) In this step,
Step 14) In this step, we will configure Git Hub in Jenkins
If you have multiple repositories in Git Hub, you need to add name Refspec field of the repository.
We can get the URI in Git Hub
Step 15) In this step,
Step 16) once we click on save below screen will appear,
Now we can build our project click on build.
Step 17) It will show the Build, click on build Number or the build date.
Step 18) once we click on build number below screen will appear where we can see the console output in this step, click on the console output.
Finally, we can verify that our build is successfully completed/executed.
This article is contributed by Chaitanya Pujari
Using the Java class "myclass" that we created in the previous tutorial, let us try to create a...
What is Gecko Driver? The term Gecko stands for a Web Browser engine that is inbuilt within...
What is Selenium Framework? The Selenium Framework is a code structure that makes code maintenance...
To understand how to run scripts in parallel, let's first understand Why do we need Session...
In Selenium automation, if the elements are not found by the general locators like id, class,...
Accessing Image Links Image links are the links in web pages represented by an image which when...