• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Programming Languages
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials
  • Automation Tools and Different Tools
    • Web Automation
      • Selenium with Java
        • Selenium Basic
        • Selenium Advance
        • Selenium Realtime
        • Framework
        • Selenium Interview
        • Selenium Videos
        • Selenium with Docker
      • Selenium with Python
      • WebdriverIO
        • Selenium Webdriver C# Tutorial
      • Cypress
      • Playwright
    • TestNG
    • Cucumber
    • Mobile Automation
      • Appium
    • API Testing
      • Postman
      • Rest Assured
      • SOAPUI
    • testRigor
    • Katalon
    • TestProject
    • Serenity BDD
    • Gradle- Build Tool
    • RPA-UiPath
    • Protractor
    • Windows Automation
  • Automation For Manual Testers
  • Services
  • Online Training
  • Contact us
  • About me
  • Follow us
    • Linkedin
    • Facebook Group
    • Facebook Page
    • Instagram

Automation

Selenium WebDriver tutorial Step by Step

You are here: Home / Advance Selenium / Complete Guide for Selenium integration with jenkins Maven

Complete Guide for Selenium integration with jenkins Maven

March 16, 2015 by Mukesh Otwani 249 Comments

Selenium integration with jenkins

Jenkins is CI (Continuous Integration) tool which will help you to run test in easy manner, In this post, we will talk about Selenium integration with Jenkins and different usage of the same.

Before starting if you have Eclipse , TestNG and if you are using Excel sheets or CSV File, then these jars should be ready.

 

Selenium integration with Jenkins using Plain Java project

 

 

   If you are using Maven project and if you want to run maven project using Jenkins then some process will change.

Selenium Integration with Jenkins using Maven project

We will divide this post into Following section

1- Download Jenkins

2- Configure Jenkins for Running Build

3- Execute Selenium build using Jenkins

4- Schedule Jobs in Jenkins to run periodically

Selenium integration with Jenkins

Part 1- Download Jenkins

Step 1-  Open your web browser and then Navigate to Below URL
http://jenkins-ci.org  this is the official website of Jenkins

Note- Below post will only work if you work with 1.6 version you can download from below url.

(Download 1.654)

https://updates.jenkins-ci.org/download/war/
Step 2- Now download Jenkins.war file and save into desktop or any other location depends on your choice

Selenium integration with jenkins
Run Selenium with Jenkins

Step 3- Once download complete. You will get Jenkins.war file that we need to execute

 

Selenium integration with Jenkins
Selenium integration with Jenkins

 

Now let’s navigate to another section

Part 2-How to configure Jenkins for Selenium

Go to the location where Jenkins.war is available. In my case, I kept in my project home directory

Selenium integration with jenkins
Selenium integration with Jenkins

Step 2- Open Command prompt knows as CMD   and navigate to project home directory and Start Jenkins server

Start- cmd> Project_home_Directory> java -jar Jenkins.war

Selenium integration with jenkins
Selenium integration with Jenkins

 

Selenium integration with jenkins
Selenium integration with Jenkins

 Step 3-

Once Jenkins server is up and running, you will get above success message.
By default Jenkins runs on 8080 port so you can navigate to below URL for Jenkins UI
Open any browser and type the URL  http://localhost:8080 

Now Jenkins in up and running so now we have to configure Jenkins so that we can execute our test case via Jenkins.

Step 4-

Once Jenkins is running so we are almost done but before moving to create build we need to configure Jenkins so that Jenkins can identify other tools as well like Java, Maven etc.

Click on > Manage Jenkins

Configure
Configure

Click on Configure System

 Selenium integration with jenkins

Selenium integration with Jenkins

Here we are telling Jenkins that our java is located at this location so we don’t have to worry about the explicit path.

Navigate to JDK section and Click on Add JDK button

 Selenium integration with jenkins

Selenium integration with Jenkins

Uncheck Install automatically check box so Jenkins will only take java which we have mentioned above.

 Selenium integration with jenkins

Selenium integration with Jenkins

Give the name as JAVA_HOME and Specify the JDK path

 Selenium integration with jenkins

In Jenkins, we have a very good feature that you can configure email notification for the user.

 

This is optional but if you want to configure Email notification then you have to do little setting while configuring Jenkins

Refer below screenshot you can change login details and click on Apply.

 Selenium integration with jenkins

Once done click on save and apply.

Congrats, your Jenkins is configured now.

Part 3- Execute Selenium build using Jenkins

We can execute test cases in Jenkins using 4 ways refer the below screenshot

 Selenium integration with jenkins

In this post, we will execute using Window batch command

 

Step 1- Create a batch file first then we will add the same batch file to Jenkins

a-To create the batch file we need to set classpath of TestNG so that we can execute testng.xml files

our project structure should look like

 

 Selenium integration with jenkins

b- Open command prompt and set the classpath-

While setting classpath we will set the path of bin folder and libs folder (inside libs we have all libraries)

Home directory > set classpath=C:\Users\Learn-automation\bin;C:\Users\Learn-automation\libs\*;

Note- Please make the changes as per your system

c- Open notepad and type the below command and save as .bat file –

In my case, I have saved as run.bat

java -cp bin;libs/* org.testng.TestNG testng.xml

 

 Selenium integration with jenkins

Selenium integration with Jenkins

Step 2-

Create a job in Jenkins which will execute our build
Open Jenkins on browser (type http://localhost:8080)

a- Click on the new item

 

 Selenium integration with jenkins

b- Give the Job-Name, select Build a free-style software project and Click on OK  button

 Selenium integration with jenkins

c- Navigate to Advanced Project Options > Check the use custom workspace > in directory we will specify the project home directory

 Selenium integration with jenkins

Selenium integration with Jenkins

d- Important part now specify the Add Build step >Click on Execute Windows batch command

 Selenium integration with jenkins

e-In the section please specify the batch file which we created and click on Apply and save

 

 Selenium integration with jenkins

 

Step 3- you can finally run the Build > Click on Build now  option

 

 Selenium integration with jenkins

 

Step 4- Check Build history and Console output and verify the output

 Selenium integration with jenkins

 Selenium integration with jenkins

 

 Selenium integration with jenkins

 

Part 4-Schedule your build in Jenkins for periodic execution

Jenkins comes with very good functionality in which we can schedule jobs which we created

You can schedule build for existing jobs which already created and while creating new project also we can specify the same.

Let’s schedule the job. Refer the below screenshot

Step 1-

Open job which we created now and Click on configure > select the check box build periodically

 Selenium integration with jenkins

 

Step 2-

Specify the time here we need to careful about the syntax

Jenkins works on Cron pattern for more info about cron refer cron link http://en.wikipedia.org/wiki/Cron

Jenkins will accept 5 parameter lets discuss one by one

* * * * *

Here the first parameter- specify minute and range will vary from 0-59

Here the second parameter- specify hours and range will vary from 0-11

Here the third parameter- specify day and range will vary from 0-7 here 0 and 7 will be Sunday

Here the fourth parameter- specify month and range will vary from 1-12

Here the fifth parameter- specify year so here you can specify *

Example 1- if you specify    00 22 * * *  it means your build will run daily @ 10 PM

Example 2- if you specify    50 * * * *  it means your build will run daily  50 min  after every hour

Example 3- if you specify    00 22 1 * *  it means your build will run every Monday @ 10 PM
 Selenium integration with jenkins

Finally, we have executed our test case successfully. If you have any issue while running Jenkins please comment below post if you are finding some issues.

Thanks for visiting my blog. Keep in touch. Have a nice day 🙂

Would love to hear from you.

 

Filed Under: Advance Selenium, Continuous integration tool Tagged With: Jenkins

Reader Interactions

Comments

  1. RAJ says

    November 10, 2020 at 1:10 AM

    Hi Mukesh,

    How to supply jenkins parameters to selenium testscripts ? Please let me know.

    Reply
    • Mukesh Otwani says

      November 11, 2020 at 2:49 PM

      Hey Raj, here is the video https://youtu.be/gT9qnZi3f74?list=PL6flErFppaj0WwNOMFeXPVlNCDuJyPYFi&t=2121

      Reply
  2. Piyush says

    May 27, 2020 at 1:39 AM

    In case of mac,i am unable to do below step

    Home directory > set classpath=C:\Users\Learn-automation\bin;C:\Users\Learn-automation\libs\*;

    on mac getting below error

    piyush@Piyushs-MBP SeleniumProject % set classpath=/Users/piyush/IdeaProjects/SeleniumProject/bin;/Users/piyush/IdeaProjects/SeleniumProject/libs/*;
    zsh: no matches found: /Users/piyush/IdeaProjects/SeleniumProject/libs/*

    Do i need to manually create the libs and bin folders in my project structure?

    Note:i am using maven project.

    Reply
    • Mukesh Otwani says

      May 27, 2020 at 8:58 AM

      Hi Piyush,

      If you are creating maven project then there is no need for libs and bin folder. Until unless, you have any library which is not available in maven repository. You can refer this link for ready understandibility https://www.youtube.com/watch?v=vFXL4nMWvXI&list=PL6flErFppaj0WwNOMFeXPVlNCDuJyPYFi

      Reply
  3. Tester_br says

    April 20, 2020 at 7:58 PM

    Hi Mukesh,

    Thanks for this guide, it’s really helpful.

    Could you please give more details about libs and bin folders? What do we need to add to them?

    Thank you!

    Reply
    • Mukesh Otwani says

      April 22, 2020 at 1:39 PM

      Hi Villa,

      Thanks for approaching me. bin folder contains .class files which are java executables and libs contains dependencies which are required during runtime. That is why we setting classpath of these folders. This is old approach. I would recommend you to go with maven which is easy to maintain

      Reply
  4. Venkatesh says

    November 20, 2019 at 12:27 PM

    Hi Mukesh,

    How to execute shell command used on Jenkins Slave : Chrome Browser Parameterization. If you have any idea or video link please share me.

    Already code is hardcoded in shell command for my project

    Reply
    • Mukesh Otwani says

      November 20, 2019 at 5:44 PM

      Hi Venkatesh,

      Create String/Choice Parameter in Jenkins job. Modify your shell script by which it can accept browser as parameter in runtime like ./ browser. Once it is done then you pass jenkins parameter like ./ $

      Reply
  5. Ravi says

    September 12, 2019 at 4:13 PM

    Hi Mukesh,

    My selenium test are passing locally But , some tests are failing in jenkin’s specially the one where I have used Assert class methods like assertTrue / assertFalse (i’ve used it for success message verification) .

    Although, These tests are also passing locally.

    I have tried few things to sort out these failure like used explicitwaits, used pagesource method to find the actual message but nothing worked.

    What could be the issue. Pls let me know.

    Thanks.
    Ravi

    Reply
    • Mukesh Otwani says

      September 12, 2019 at 7:00 PM

      Hi Ravi,

      Have you checked the screenshot of corresponding where your test is getting failed. This would help you to analyse issue well.

      Reply
  6. ram says

    August 19, 2019 at 11:11 AM

    how can i do code integration, different people implemented code for selenium famework

    Reply
    • Mukesh Otwani says

      August 19, 2019 at 8:42 PM

      Hi Ram,

      For integration of code, your team must have common code repository like SVN or Git which help all to integrate individual code efficiently without redundancy.

      Reply
  7. madhavi says

    July 25, 2019 at 9:22 PM

    Hi mukesh,

    I have configured maven project in jenkins but my scripts are running in headless browser .what changes i need to do to display the browser.please help me

    Reply
    • Mukesh Otwani says

      July 25, 2019 at 9:48 PM

      Hi Madhavi,

      By default in Jenkins, web browser execution runs on headless mode on master. In order to see actual execution, you have to create slave and run your execution on newly created slave.

      Reply
  8. Avinash Yerramsetti says

    July 19, 2019 at 10:10 PM

    Hi Mukesh, Can you direct me to a tutorial where it teaches Integration of Nightwatch with Jenkins. Thanks
    in Advance

    Reply
    • Mukesh Otwani says

      July 21, 2019 at 10:44 AM

      Hi Avinash,

      Apologies, I haven’t posted anything about nightwatch js framework.

      Reply
  9. Rajesh says

    July 17, 2019 at 2:14 AM

    Hi Sir,
    I learned lots of things with your vedios and it is very helpfull for my work i would like to pay thanks for this.

    Now I am runing my Automation script in centos server using jenkins but I am facing one issue i.e “org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary”
    Can you plz help me sir. And this problem is only coming wh=en i am running my script in centos server of my AWS instance.

    Reply
    • Mukesh Otwani says

      July 17, 2019 at 9:28 AM

      Hi Rajesh,

      It looks like chrome browser is not installed on your Jenkins hosted server. If not installed, download chrome-stable.rpm from chrome website using wget or any other tool then install it using sudo yum install ./gogole-chorome…rpm

      Reply
  10. madhavi says

    July 9, 2019 at 6:08 PM

    hi mukesh

    in one scenario i am facing one issue in automation button is not enabling after entering the mandatory fields but when i entered manually button is enabling i don’t know i could be the reason please help out.

    Reply
    • Mukesh Otwani says

      July 9, 2019 at 10:10 PM

      Hi Madhavi,

      Once you fill last mandatory field, call TAB key using Actions class or click on somewhere else so that validation for all filled fields gets done.

      Reply
      • madhavi says

        July 12, 2019 at 2:28 PM

        Thank you mukesh

        Reply
  11. Santosh says

    May 21, 2019 at 3:45 PM

    Hi Mukesh,

    Need to run my scripts in Ubuntu Platform through Jenkins

    Please help me the same!

    Reply
    • Mukesh Otwani says

      May 22, 2019 at 12:37 AM

      Santosh,you can use Docker here to run Selenium on Linux.

      Reply
  12. Vijaya says

    May 20, 2019 at 3:58 PM

    Hi Sir,

    I have installed Jenkin on my window machine version 2.164. Login is required to use the jenkin, I have skipped the registration process, and now i dont remember the default password. How to login to the Jenkin?

    Reply
    • Mukesh Otwani says

      May 20, 2019 at 6:54 PM

      Hi Vijaya,

      Go to .jenkins folder(generally in your user folder )-> Open Config.xml file -> Look for tag useSecurity -> Change its value from true to false -> Save that .xml file -> Restart your jenkins

      Reply
  13. Ram says

    February 21, 2017 at 3:22 PM

    Hi,
    Kindly provide your advice…we are using selenium tool with hybrid framework…How to integrate the selenium and Jenkins for dynamically select the different script sheet and test data sheet.
    Ex: Using multiple scripts sheet and Test data sheets for each module.
    Note: Our application size is very big 1000 screens. But continuous we are using more that 200+ screens.

    Reply
    • Mukesh Otwani says

      February 22, 2017 at 5:06 PM

      Hi Ram,

      Create discrete test case and you can use batch/shell commands to run your different scripts wrt corresponding data sheet and obviously it will take time.

      Reply
  14. Sudeep says

    February 15, 2017 at 1:02 PM

    Hi, My bin structure is
    C:\projectWorkSpace\TMS\bin\executionEngine and inside this there are three class files
    1)LoginTMS.class
    2)registerTMS.class
    3)TaskEntry.class
    I have to run registerTMS.class
    Could you let me know command which i need to include in my bat file

    Reply
    • Mukesh Otwani says

      February 16, 2017 at 11:49 AM

      Hi Sudeep,

      You can pass only registerTMS.java in your xml and run.

      Reply
      • Azhar says

        February 20, 2017 at 11:58 PM

        Hi Mukesh,
        Need to run jenkins job but browser should be visible,
        How we can do this?

        Reply
        • Mukesh Otwani says

          February 21, 2017 at 11:57 AM

          Hi Azhar,

          If you are using windows machine as Slave then don’t run slave as windows service.

          Reply
  15. roushini says

    February 9, 2017 at 5:32 PM

    hi
    thanks i was a ui dev like 2 weeks ago thanks to ur youtube channel and tese articles , im able to work on real project scenarios as a tester better in a matter of no time, please keep up the good work
    thanks again and if possible can it be more python related (jus hoping or if u cud point me to somewer i can tose better will be grt)

    Reply
    • Mukesh Otwani says

      February 9, 2017 at 7:05 PM

      Hi Roushini,

      I am working on python stuffs.

      Reply
  16. Mak says

    February 8, 2017 at 4:05 PM

    Hi Mukesh,
    I need to test number of similar sites with different URLs, but the sites are almost similar, and I can use same set of test cases for all the sites. I also need to test on different browsers and different environments like stage, prod etc.
    Now my question is, if I want to run test suite for only 2 sites, on only one environment(e.g stage), on only two browsers (out of many, say 3), is it possible to decide this at run time?
    I am asking this because, I want it to be decided dynamically, and one should not need to make changes every time in xml to decide on which site, env., browser to execute on. (e.g.: Some times, we need to test only one or two site on only one browser)
    Could you please suggest if there is any way to achieve this.
    Thanks.

    Reply
    • Mukesh Otwani says

      February 16, 2017 at 8:53 PM

      Hi Mak,

      As per your requirements, you definitely need to go for testng xml file. You can provide testcase name, gruops, parameter…so on to xml file while building. For this you need to create a Java class which can parse xml file and accept theses parameters.

      Reply
  17. Sudha says

    February 2, 2017 at 10:32 PM

    Hi Mukesh, I’ve a doubt and i know that’s silly but i want to clarify it. Whether we can integrate selenium scripts with jenkins without using testng test scripts. Apologies if this sounds stupid.

    Reply
    • Mukesh Otwani says

      February 3, 2017 at 6:38 PM

      Hi Sudha,

      yes, you can…As per java, you need to mention main() method in the java file(the one which you want to execute). After building dependencies using POM.xml, just navigate to folder where you have kept your java file then execute as you do in cmd.

      Reply
  18. Alex says

    February 1, 2017 at 9:29 PM

    I was wondering if someone can help me with this issue that I am facing when I click on failed test browser screenshot in jenkins to see the failed image I got 404 page not found.
    I had jenkins setup in linux machine and I am using 4 vm’s grid which is work before in another machine the only thing I did I reinstall jenkins in new machine no changes has been done on the testlistener.
    Hope that anyone can direct me to the right track.
    Thanks

    Reply
    • Mukesh Otwani says

      February 5, 2017 at 7:08 PM

      Hi Alex,
      As you mentioned that you have new jenkins instance. Could you please check whether the url which is being referenced to view failed screenshot is correct or not.

      Reply
  19. Gurjot Ahuja says

    February 1, 2017 at 3:39 PM

    Awesome steps, it worked for me! One thing I would like you to edit above :
    In run.bat file, the command should be :
    “java -cp D:\Eclipse_workspace\Selenium_CMS\libs\*;D:\Eclipse_workspace\Selenium_CMS\bin org.testng.TestNG testng.xml
    “

    Reply
    • Mukesh Otwani says

      February 1, 2017 at 5:22 PM

      Thanks Gurjot for updates. I will make the changes soon.

      Reply
  20. Shiva Krishna says

    January 13, 2017 at 4:20 PM

    Hi Mukesh, Recently i have installed Jenkins in my company it was installed successfully but the problem is that when we are trying to trigger a report mail using our company mail ID. Could you please send the reply reason behind this issue.

    Reply
    • Mukesh Otwani says

      January 13, 2017 at 10:25 PM

      Hi Shiva,

      Did you try Test Mail option inside Manage Jenkins. Moreover it depends on your network connection. Its better if you contact your organizational network admin.

      Reply
  21. Shoaib Patel says

    January 11, 2017 at 11:17 PM

    Hi Mukesh,
    If Jenkin server is hosted on a headless unix machine, this will not work. Can you please explain how to execute Cucmber Selenium java scripts on such server?

    Thanks..

    Reply
    • Mukesh Otwani says

      January 13, 2017 at 11:14 AM

      Hi Shoaib,

      This will help https://www.youtube.com/watch?v=ceRnV0C3pDw&t=4s

      Reply
  22. Amit Kumar Singh says

    December 27, 2016 at 10:19 AM

    Started by user anonymous
    Building in workspace C:\mywork\Jenkins
    [Jenkins] $ cmd /c call C:\Users\AMITSI~1\AppData\Local\Temp\hudson8254443489790097217.bat

    C:\mywork\Jenkins>run.bat

    C:\mywork\Jenkins>java -cp bin; libs/* org.testng.TestNG testng.xml
    Error: Could not find or load main class libs.*
    Build step ‘Execute Windows batch command’ marked build as failure
    Finished: FAILURE

    Can you tell me, how to resolve this issue.

    Reply
    • Mukesh Otwani says

      December 28, 2016 at 11:37 AM

      Hi Amit,

      Please try with maven https://www.youtube.com/watch?v=A4Z1F7gJvkY

      Reply
  23. Zafar says

    December 27, 2016 at 5:35 AM

    Hi Mukesh,

    First let me say thank you. I have learnt a lot from your tutorials.
    Now regarding the “Selenium integration with jenkins”. i have followed you tutorial and steps exactly. When i use just a printout statement it works for both(eclipse and Jenkins).
    When i use following code.

    package demoJenkins;

    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.firefox.FirefoxDriver;
    import org.testng.annotations.Test;
    public class JenkinsDemo {
    @Test
    public void testJenkins(){

    System.out.println(“Selnium has been configured with Jenkins”);
    System.setProperty(“webdriver.gecko.driver”, “D:/Selenium/softwares/geckodriver.exe”);
    WebDriver dr = new FirefoxDriver();
    dr.get(“http://www.facebook.com”);
    System.out.println(dr.getTitle());
    dr.quit();
    }
    }

    This code works for Eclipse without any error. But in Jenkin it says
    “D:\java\Jenkins>java -cp bin;lib/* org.testng.TestNG testng.xml
    [[TestNGClassFinder]] Unable to read methods on class demoJenkins.JenkinsDemo – unable to resolve class reference org/openqa/selenium/WebDriver”

    Could you please suggest me the problem with it?

    Reply
    • Mukesh Otwani says

      December 28, 2016 at 11:40 AM

      Hi Zafar,

      Please try with maven https://www.youtube.com/watch?v=A4Z1F7gJvkY

      Note- Now a days in companies maven only used.

      Reply
  24. Ahmed Bilal says

    December 15, 2016 at 4:30 PM

    You are the best Mukesh! good sharing … did same in same pace with your demo (y)

    Reply
    • Mukesh Otwani says

      December 15, 2016 at 5:17 PM

      Great Ahmed. Cheers 🙂

      Reply
  25. Saurabh Sahu says

    November 27, 2016 at 5:35 PM

    hello,
    when i open url ,getting authentication pop up so which credential i should give and i tried my window credential that is not working

    Reply
    • Mukesh Otwani says

      November 30, 2016 at 7:30 PM

      Hi Saurabh,

      Please follow below guide http://learn-automation.com/handle-windows-authentication-using-selenium-webdriver/

      Reply
  26. Arunpandi says

    November 22, 2016 at 7:35 AM

    You are great bro !! I have seen some of your videos also in youtube before.

    I am going to try this one…Thank you again!!

    Reply
    • Mukesh Otwani says

      November 23, 2016 at 1:16 PM

      Yes sure try and let me know if any issue.

      Reply
      • Ram says

        November 30, 2016 at 11:26 AM

        Hi Sir,

        I have one doubt in jenkins ..

        How we will call selenium tests from jenkins

        Reply
        • Mukesh Otwani says

          November 30, 2016 at 5:07 PM

          Hi Ram,

          Above guide covers the same only.

          Reply
  27. Patricia says

    November 21, 2016 at 11:14 PM

    Hello Mukesh,
    Quick question. I don’t have the folder lib that you mention in your screenshot.
    What’s the meaning of this folder? Should I have one in my project?
    I cannot implement your solution 🙁
    Thanks in advance!

    Reply
    • Mukesh Otwani says

      November 23, 2016 at 1:31 PM

      Hi Patricia,

      Lib folder we have to created manually and we need to keep all jars which we downloaded from Selenium site.

      I also use maven approach to run test from Jenkins (Recommended)

      Here is the link for video https://www.youtube.com/watch?v=A4Z1F7gJvkY

      Reply
  28. Manoj says

    November 1, 2016 at 12:04 PM

    Hi Mukesh, I AM Following From Long time and It’s a Gr8 Resource For All The Testers But In The Jenkin Video Ur Using 1.6 Version But in 2.19 Jenkins Version There is no Such Options For JDK path setup. So Can U Guide Should I need to Enter the System Variable Details Or We Can Skip That

    Reply
    • Mukesh Otwani says

      November 6, 2016 at 10:29 AM

      HI Manoj,

      You can get this option in Manage Jenkins >Global tool configuration

      Reply
      • Arvind says

        February 16, 2017 at 9:52 PM

        Hi Mukesh I want to attach target folder index.html in my jenkins mail. How do I achieve that? I am using junit with cucumber. In the attachment section I am passing target/cucumber-htmlreport/feature-overview.html/**

        Reply
        • Mukesh Otwani says

          February 17, 2017 at 10:23 AM

          Hi Aravind,

          Check this link https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin

          Reply
  29. shivkumar says

    October 30, 2016 at 5:40 PM

    Hi, Mukesh.
    I have installed and configured Jenkins…but didn’t create an account instead entered as an ADMIN…Later, logged out of the account…
    Now, as I want to use Jenkins,it’s asking for login & password and theirs no option to create a new account ….plz guide me to create a new one.

    Reply
    • Mukesh Otwani says

      October 31, 2016 at 3:37 AM

      Hi Shiv,

      You can delete .jenkins folder from C drive user folder and try to do it again with Jenkins 1.6 version.

      Reply
      • shivkumar says

        November 1, 2016 at 2:46 PM

        Thanks buddy for ur quick response…
        I m referring ur blog & all the youtube selenium videos…they simply awesome…thanx (y) 🙂

        Reply
        • Mukesh Otwani says

          November 4, 2016 at 2:37 AM

          thank you shiv

          Reply
  30. manish says

    October 25, 2016 at 10:46 AM

    Hello Mukesh, please help me here
    1 ) in Jenkins, How can we send report of successful builds to recipients? (email)

    2) How can we send automatic test report emails (in Eclipse) to recipients once our TestNG tests completes

    Reply
    • Mukesh Otwani says

      October 25, 2016 at 1:50 PM

      Hi Manish,

      For Jenkins Email-Ext plugin can be used.
      From Selenium you can use below link
      http://learn-automation.com/send-report-through-email-in-selenium-webdriver/

      Reply
      • manish says

        October 25, 2016 at 4:23 PM

        Thanks a lot Mukesh for quick and great reply.
        Your Jenkins’s short & crispy video on YouTube is superb

        Reply
        • Mukesh Otwani says

          October 25, 2016 at 5:43 PM

          Glad it helped 🙂 Thanks Manish

          Reply
  31. yogesh says

    October 20, 2016 at 10:43 PM

    im using mac OSX , i want to run selenium test case in command terminal and i don’t know commands in mac pls help me example i want to excute my all test suit at one (terminal)

    Reply
    • Mukesh Otwani says

      November 6, 2016 at 10:23 AM

      COnfigure maven only and rest will remain same.

      Reply
  32. sindhu says

    October 19, 2016 at 3:12 PM

    HI mukesh , im using mac OSX ,i have to execute the script in execute shell which command should be used and whats the procdure

    Reply
    • Mukesh Otwani says

      October 20, 2016 at 2:03 PM

      Hey Sindhu,

      You can directly give path of pom.xml file in OSX then you dont have to write shell script for this.

      refer below video for more details

      Reply
  33. Rohit Sharma says

    October 14, 2016 at 3:07 AM

    How can we configure latest Jenkins 2.7.2 ??
    I didn’t see any JDK installation link

    Reply
    • Mukesh Otwani says

      October 14, 2016 at 6:21 PM

      Hi Rohit,

      You can find in Global tool configuration.

      Reply
  34. kanchana says

    October 8, 2016 at 4:00 AM

    Hi Mukesh sir, I downloaded jenkins (1.6version) also but i cannot see any jdk installation tag on jenkins ?
    please help me in this issue?

    Reply
    • Mukesh Otwani says

      October 10, 2016 at 12:35 AM

      is it fixed?

      Reply
  35. kanchana says

    October 8, 2016 at 2:12 AM

    Hi mekesh sir,
    while executing testng.xml through command propmpt …i am getting this error
    Could not find or load main class org.testng.TestNG….
    please help?????

    Reply
    • Mukesh Otwani says

      October 10, 2016 at 12:34 AM

      Hi Kanchana,

      Kindly use maven project and run pom.xml file from cmd.

      Reply
  36. Nipun says

    October 5, 2016 at 7:49 PM

    I tried to run my project using Jenkins.There is a functionality where I need to upload a document.
    Its working fine on eclipse.But Jenkins does not allow me to upload the file.

    Can you please provide me with the solution.It would be really helpful

    Reply
    • Mukesh Otwani says

      October 5, 2016 at 11:02 PM

      Hi Nipun,

      Are you using sendKeys or AutoIT. I also have so many scenario like this but it works for me always.

      Reply
      • Arpita says

        November 4, 2016 at 6:49 PM

        Hey Mukesh,

        I am also facing the same issue. i am using ActiveIt. Could you please help me with a way?

        Reply
        • Mukesh Otwani says

          November 4, 2016 at 10:24 PM

          What is ActiveIt Arpita?

          Reply
          • Arpita says

            November 7, 2016 at 11:22 AM

            i’m sorry i meant AutoIT.
            I have prepared an .exe and using that to upload files form local.
            This is working fine on my local m/c but not working with jenkins, it is not being able to identify the popup then.
            Please help…

          • Mukesh Otwani says

            November 30, 2016 at 8:00 PM

            Hi Arpita,

            Try with Robot class. It works with Jenkins as well.

  37. Vandana says

    October 5, 2016 at 12:19 PM

    In short, using jenkins I am unable to launch any site in the firefox browser using command driver.get(“url”);

    Reply
    • Mukesh Otwani says

      October 5, 2016 at 11:07 PM

      HI Vandana,

      Try below post http://learn-automation.com/use-firefox-selenium-using-geckodriver-selenium-3/

      Reply
  38. Pooja Vengurlekar says

    October 3, 2016 at 4:31 PM

    In above tutorial, while performing above steps, at step 4, I don’t find JDK under Manage jenkins ->Configure System. Please help

    Reply
    • Mukesh Otwani says

      October 3, 2016 at 4:36 PM

      Hey Pooja,

      Kindly download Jenkins 1.6 version then only above options will come.

      Reply
  39. praveen says

    October 3, 2016 at 3:56 PM

    hi mukesh ..

    ur youtube video is very usefull

    Reply
    • Mukesh Otwani says

      October 3, 2016 at 4:09 PM

      Thanks Praveen

      Reply
  40. Naveen Balanagu says

    October 3, 2016 at 5:48 AM

    Hi Mukesh,

    I have configured and everything works fine. But I would like to see the browser when I run the tests using jenkins. Can you tell me if that is possible?

    Reply
    • Mukesh Otwani says

      October 3, 2016 at 4:18 PM

      Yes if you install Jenkins as war file then you can see the execution live.

      Reply
      • Naveen Balanagu says

        October 5, 2016 at 10:51 PM

        Thanks Mukesh. I reinstalled and configured it again and this time it shows the browser running tests.

        Reply
        • Mukesh Otwani says

          October 5, 2016 at 11:01 PM

          Hi Naveen,

          Good to hear. Cheers 🙂

          Reply
  41. Omar Careem says

    September 24, 2016 at 11:40 PM

    How to run selenium tests using chrome driver in jenkins? Please let me know.

    Reply
    • Mukesh Otwani says

      September 29, 2016 at 11:12 AM

      Hi Omar,

      Process will remain same only small change in script. You can use ChromeDriver()

      Below url will help http://learn-automation.com/launch-chrome-browser-using-selenium-webdriver/

      Reply
      • Roman says

        February 11, 2017 at 10:08 PM

        Hi Mukesh , I am trying to run my selenium test with chrome browser in Jenkins . Our company Jenkins supported by AWS . I can run test with firefox but I am not able to run with chrome . I don’t want headless browser , I want run my test with chrome browser in Jenkins browser . Locally my test run with chrome browser perfect but Jenkins is not supporting .If you provide step by step it will be great. I couldn’t find any video or description online . No one talking about it . If you can give us solution it will be very helpful for everyone

        Reply
        • Mukesh Otwani says

          February 12, 2017 at 3:58 PM

          Hi Roman,
          As per my knowledge, if your execution is running in headless mode then the slave is installed as service(in windows) on which your test is running. Connect slave without installed as service.

          Reply
  42. usama awan says

    September 20, 2016 at 6:54 PM

    Hi Mukesh;

    I am using selenium version 2.53 and firefox 45.02

    On mac when i run my selenium TestNG test case from eclipse/terminal they work perfectly fine but when i build them form Jenkins they fail while locating elements.

    Reply
    • Mukesh Otwani says

      September 29, 2016 at 2:48 PM

      Hi Usama,

      Strange for me. Can you please check the console log/error so that we can check the issue.

      Reply
  43. chandrasekhar says

    September 20, 2016 at 5:14 PM

    superb info..thank you very much

    Reply
    • Mukesh Otwani says

      September 29, 2016 at 2:29 PM

      Your most welcome Mate 🙂

      Reply
  44. Manmohan says

    September 15, 2016 at 5:40 PM

    I have successfully installed jenkin in linux sever . i want to execute my test case or testng.xml which is on local system. and sever is command based , there is no browser support . i want my test case to run in server(linux) automatically . what should i do.

    Reply
    • Mukesh Otwani says

      September 19, 2016 at 12:58 PM

      Hi Manmohan,

      Not sure on linux 🙁

      Reply
      • Sofia says

        September 23, 2016 at 1:10 AM

        i got error in cmd when i gave java -jar
        unspecified jar

        Reply
        • Mukesh Otwani says

          September 23, 2016 at 2:36 AM

          Hi Sofia, Kindly mention the jar also after java -jar jenkins.war

          Reply
  45. Prashant Soni says

    September 9, 2016 at 10:30 AM

    thanks mukesh sir, following information are so helpful

    Reply
    • Mukesh Otwani says

      September 12, 2016 at 3:42 PM

      Thanks Prashant.

      Reply
  46. Anmol says

    September 8, 2016 at 3:56 AM

    Hi Mukesh,

    I am not able to run web based selenium scripts using Jenkins. For ex, I have a script which login to gmail and check my emails but not able to make it work from Jenkins.
    Is there any plugin required for the same. ?

    Reply
    • Mukesh Otwani says

      September 12, 2016 at 3:43 PM

      Hi Anmol, Kindly provide console output with issues.

      Reply
      • Anmol says

        September 13, 2016 at 2:26 AM

        Hi Mukesh,

        There is no error on the Jenkins side. The script passes successfully in Jenkins. But I am not getting the desired result. Let me explain more about my scenario –

        My Selenium script uses excel sheet to fetch the login id and pwd and then it login to gmail and read the subject of emails and enter it in another excel. This script runs fine as standalone Java application in eclipse. But when configured with Jenkins it is not reading any email and hence not writing anything in the excel sheet. The funny things is – In Jenkins console the script passes successfully.

        The example you have provided works fine in Jenkins at my end also. I can login to facebook and read the title. But my scenario of gmail is not working.

        I am highly thankful that you took time to address my issue. Please see if you can provide more help. Thanks.

        Reply
        • Mukesh Otwani says

          September 15, 2016 at 6:07 PM

          Hi Anmol,

          I just tried same thing and it worked like charm.

          Reply
  47. Test admin says

    August 29, 2016 at 10:38 AM

    Hi, If I follow the above steps in Linux, will it work?

    Reply
    • Mukesh Otwani says

      September 8, 2016 at 1:31 AM

      Yes hope so

      Reply
  48. Pradeep Samson says

    August 26, 2016 at 3:40 PM

    Hi Mukesh,

    I am getting one error while adding test class – @Test

    “Test cannot be resolved to type”

    Please help!

    Reply
    • Mukesh Otwani says

      August 27, 2016 at 10:28 PM

      Can u provide the code as well?

      Reply
  49. Anwar says

    August 26, 2016 at 3:35 PM

    Hi Mukesh,

    how to schedule builds in jenkins with out periodically . it means automatically it will run continuously one by one. Please let us know

    Reply
    • Mukesh Otwani says

      August 27, 2016 at 10:29 PM

      Hi Anwar,

      I have not tried but its good question let me check out. I use click build now option to run build in Jenkins.

      Reply
  50. pavankumar says

    August 24, 2016 at 4:42 PM

    Hi Mukesh,

    I have done the jenkins setup and i am able to run the job with maven integration. I added the recipients list in the Editable email notification section. After the completion of job, i didn’t get any mail from the jenkins. I got “No emails were triggered.” in console output. Please help me!

    Reply
    • Mukesh Otwani says

      August 27, 2016 at 11:06 PM

      Hi Paavan,

      Is email config is correct?

      Reply
      • pavankumar says

        September 1, 2016 at 12:43 PM

        Hi Mukesh,

        I checked the configuration and tried to trigger test mail from jenkins which is sent message successfully. I configured the email settings in both Configuration system in Manage Jenkins section, and in Postbuild step in Job configuration also.

        Can i have an option to attach screenshot to this reply to explain in a better way what i have configured.

        Reply
        • Mukesh Otwani says

          September 2, 2016 at 5:58 PM

          Hi pavan,

          This plugin will help you https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin

          Reply
  51. Rupesh says

    August 24, 2016 at 2:59 PM

    Hi Mukesh,

    Very good stuff to understand the next level of selenium process.

    Can you please provide the details to connect Jenkins for python

    Kind regards

    Reply
    • Mukesh Otwani says

      August 27, 2016 at 11:08 PM

      Hi Rupesh,

      I have not tried with Python but will give a try for this.

      Reply
  52. Amod Mahajan says

    August 22, 2016 at 4:34 PM

    Hi Mukesh,

    I have a maven project which runs perfectly through eclipse but when I try to run same project through jenkins, it is getting failed in @BeforeTest only.

    Getting below error message:
    Running TestSuite
    Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 40679
    Only local connections are allowed.
    Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 63.388 sec <<< FAILURE!
    beforeTest(MavenDemo.MavenEx) Time elapsed: 63.232 sec <<< FAILURE!
    org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages
    (Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 10.0.10586 x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 61.06 seconds
    Build info: version: 'unknown', revision: '31c43c8', time: '2016-08-02 21:57:56 -0700'
    System info: host: 'DESKTOP-G2E94QN', ip: '172.16.2.152', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101'
    Driver info: org.openqa.selenium.chrome.ChromeDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    Reply
    • Mukesh Otwani says

      August 27, 2016 at 11:02 PM

      Hi Amod,

      Can u try with Chrome driver 2.22

      Reply
  53. Ranjitha says

    August 18, 2016 at 10:07 PM

    Hi Mukesh,

    I am following the same steps as mentioned by you above.
    I am stuck in Jenkin proxy configuration.
    Without proxy configuration, email notification is not available.
    But unable to configure proxy setting.

    java -jar Jenkins.war works fine.
    I can see it says it is up and running successfully.

    Later in http://localhost:8080, Proxy configuration, gives error

    Kindly, let me know how should i proceed.

    Reply
    • Mukesh Otwani says

      August 18, 2016 at 10:35 PM

      HI Ranjitha,

      Have you tried below steps to set proxy?

      Reply
  54. Bimlesh says

    August 8, 2016 at 10:01 PM

    Hi Mukesh,

    I am trying to run my maven test from github using jenkins.

    I am trying to create a new item by selecting maven project and chosing GIT from source code management. When I give the reporsitory URL as “git@github.com:Bimlesh1681/AmazonIndia.git” – I get the error ==> Failed to connect to repository : Error performing command: git.exe ls-remote -h git@github.com:Bimlesh1681/AmazonIndia.git HEAD

    Also with the new version of jenkins, I do not see any options to configure JDK from jenkins > configure system.

    Please advise on both these issues.

    Reply
    • Mukesh Otwani says

      August 8, 2016 at 11:24 PM

      Hi Bimlesh,

      I shared video for github and for jenkins you can use Global tool location.

      CLick on manage jenkins – Global tool location. then JDK

      Reply
      • Bimlesh says

        August 10, 2016 at 4:07 PM

        Hi Mukesh,

        Thank you so much for sharing the videos and it was very useful.
        kindly advise on these issues which is stopping me to execute my first job from jenkins 🙁

        Issue 1: I am now able to configure JAVA successfully from the Global Tool Configuration section and from GIT section,
        the Path to Git executable is by default set to git.exe which is giving me the error

        “There’s no such executable git.exe in PATH: C:/Program Files (x86)/RSA SecurID Token Common,
        C:/ProgramData/Oracle/Java/javapath, C:/windows/system32, C:/windows, C:/windows/System32/Wbem,
        C:/windows/System32/WindowsPowerShell/v1.0/, C:/Program Files/ActivIdentity/ActivClient/, C:/Program Files (x86)/ActivIdentity/ActivClient/,
        C:/windows/System32/WindowsPowerShell/v1.0/, C:/Program Files/Java/jdk1.8.0_71/bin/.”

        Issue 2: Also when I am trying to configure a new job from jenkins by choosing Git from the Source Code Management,
        I am specifying the repository URL git@github.com:Bimlesh1681/AmazonIndia.git which is giving me the error
        “Failed to connect to repository : Error performing command: git.exe ls-remote -h git@github.com:Bimlesh1681/AmazonIndia.git HEAD”

        Reply
        • Mukesh Otwani says

          August 18, 2016 at 10:01 AM

          is it fixed? Bimlesh

          Reply
          • Bimlesh says

            August 18, 2016 at 8:12 PM

            Hi Mukesh,

            The issue got fixed when I configured the GPG key too along with the SSH key.
            (https://help.github.com/articles/telling-git-about-your-gpg-key/)

            Thanks for checking! 🙂

          • Mukesh Otwani says

            August 18, 2016 at 10:40 PM

            Cheers Bimlesh

  55. Ranjana says

    July 29, 2016 at 6:52 PM

    Hi Mukesh,
    Can you please post the video for complete Maven Project Deployment using Jenkins.

    Reply
    • Mukesh Otwani says

      August 2, 2016 at 12:33 PM

      Hey Ranjana,

      I have already uploaded on Youtube and here is the link for the same https://www.youtube.com/watch?v=A4Z1F7gJvkY

      Reply
  56. Ranjana says

    July 29, 2016 at 6:51 PM

    Hi Mukesh,
    How to run the selenium tests with “execute shell” option. Please help!

    Reply
    • Mukesh Otwani says

      August 2, 2016 at 12:33 PM

      Hi ranjana,

      for linux also you can use maven commands.

      Reply
  57. Mohanasundaram says

    July 26, 2016 at 7:22 PM

    pls help me,

    how to resolve this issue”[TestNG][Error]
    cannot instantiate class Com.Helper.Testing

    Note:Com.Helper is package name

    Reply
    • Mukesh Otwani says

      July 27, 2016 at 12:04 AM

      You can give some other package name and will run code again.

      Reply
  58. sahil says

    July 19, 2016 at 12:32 PM

    Hi Mukesh,

    When adding jar in the jenkins getting error message “C:\Program Files\Java\jdk1.8.0_05 doesn’t look like a JDK directory”.

    Thanks
    Sahil

    Reply
    • Mukesh Otwani says

      July 20, 2016 at 1:52 PM

      Hi Sahil,

      It seems JDK in installed at some other location. Kindly check the location again.

      Reply
  59. kiran says

    July 8, 2016 at 1:37 PM

    Hi Mukesh
    Thanks for the wonderful tutorial.You made it look very simple.

    I’ve configured my project to run the Build with Jenkins if I execute the testng.xml on my own it successfully execute my test case but if I execute via cmd it simply skips the test and also in Jenkins I get the following error message

    ===============================================
    Suite
    Total tests run: 1, Failures: 0, Skips: 1
    Configuration Failures: 1, Skips: 1
    ===============================================

    Build step ‘Execute Windows batch command’ marked build as failure
    Finished: FAILURE

    However it execute the build successfully if test case output is just using `(system.out.println();)

    if test case relates to opening of browsers it gets failed via Jenkins

    I used the java -cp bin;lib/* org.testng.TestNG testng.xml command as well doesnt work neither in cmd nor in jenkins.

    My jdk bath in configuration I double checked its right.
    C:\Program Files\Java\jdk1.8.0_92

    Thanks in advance!

    Reply
    • Mukesh Otwani says

      July 12, 2016 at 4:58 PM

      Hey Kiran,

      If you are using Maven they try to run pom.xml file from Jenkins.

      Reply
  60. Yuva says

    June 30, 2016 at 4:36 PM

    Hi Mukesh,

    I have a dought, I design a frame work with Extend Report’s every thing is fine. But if we integrate with Jenkins it’s not working. With out ExtendReports it’s working.

    Can you please let me know any Plugin is available for ExtendReports? , if it is please specify the name.

    Reply
    • Mukesh Otwani says

      July 2, 2016 at 2:57 PM

      Hi Yuva,

      No plugin for jenkins for extent reports.

      Reply
  61. Jai Prakash Keswani says

    June 27, 2016 at 9:11 PM

    Hi Mukesh,

    When I type “http://localhost:8080” in FF. I receive an error

    “Unable to Connect”
    “Firefox can’t establish a connection to the server at localhost:8080.”

    Reply
    • Mukesh Otwani says

      July 2, 2016 at 3:07 PM

      It means jenkins is not started

      Reply
  62. Jai Prakash Keswani says

    June 27, 2016 at 8:28 PM

    Hi Mukesh,

    Thanks very much for the easy step by step tutorial. but while setting classpath I am gettig following Error.

    C:\Users\SDWA-174\workspace\Guru99>set classpath-C:\Users\SDWA-174\workspace\Guru99\bin;
    Environment variable classpath–C:\Users\SDWA-174\workspace\Guru99\bin; not defined

    C:\Users\SDWA-174\workspace\Guru99>set classpath-C:\Users\SDWA-174\workspace\Guru99\lib\*;
    Environment variable classpath–C:\Users\SDWA-174\workspace\Guru99\lib\*; not defined

    Could you please clarify, why do we get this kind of error.

    Reply
    • Mukesh Otwani says

      July 2, 2016 at 3:08 PM

      Some space issue kindly follow video again.

      Reply
  63. upali says

    June 22, 2016 at 5:22 AM

    Hi Mukesh,

    Can you show how to add a build step using Maven?

    Reply
    • Mukesh Otwani says

      July 2, 2016 at 3:25 PM

      Hey Upali,

      Here we go http://learn-automation.com/selenium-maven-build-and-usage/

      Reply
  64. Neha says

    June 16, 2016 at 11:29 AM

    Can u clarify what does lib and bin consists of ?? Please note i donot have such folders as I am using a maven project(with pom.xml)..I want to run Testng.xml from jenkins ..How do I do that ??Your quick reply will be appreciated.

    Reply
    • Mukesh Otwani says

      June 20, 2016 at 12:13 PM

      Hey Neha,

      Lib contains all jars.
      Bin contain binary files, you will get this folder if you are working with plain java project. If you are working with maven then you can provide testng.xml in pom directly.

      Reply
  65. Tejas says

    June 13, 2016 at 2:18 PM

    When i have clicked on build now in jenkins, system is opening the browser and run the script on browser UI.

    Reply
    • Mukesh Otwani says

      June 14, 2016 at 9:11 PM

      Hey Tejas,

      It working I guess so what is the issue here?

      Reply
  66. Adeel Zahir says

    May 19, 2016 at 5:37 PM

    Hi Mukesh

    I am getting this error

    Error: Could not find or load main class org.testng.TestNG

    Did I miss any step of including testng?

    Reply
    • Mukesh Otwani says

      May 21, 2016 at 1:17 AM

      Hi Adeel,

      Class path is not set properly please set class path again.

      Reply
      • Adeel Zahir says

        June 2, 2016 at 2:25 PM

        Thank you. It worked.

        Reply
        • Mukesh Otwani says

          June 4, 2016 at 12:34 AM

          Cheers 🙂

          Reply
      • Adeel Zahir says

        June 2, 2016 at 3:55 PM

        I am able to run testng.xml from eclipse. But when I run it from terminal, it gives an error

        org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:

        I have tried almost all the versions of selenium but its not working.

        Firefox version: 31

        Reply
        • Mukesh Otwani says

          June 4, 2016 at 12:42 AM

          Hi Adeel,

          Please use FF 45 and Selenium 2.53 version to fix this error.

          Reply
  67. Ayushi Sharma says

    May 19, 2016 at 5:24 PM

    I could not find videos for Create build and Execute build for nightly execution and Emailable functionality ,
    could you please ping link here ?

    Reply
    • Mukesh Otwani says

      May 21, 2016 at 1:20 AM

      Reply
  68. Ankita Jangra says

    May 19, 2016 at 3:48 PM

    Hey Mukesh,

    I want to do Cucumber-jvm reportin ng using Jenkins plugin (Cucumber-jvm report) and facing the error something like .json file is not found in the expected folder. However, this .json file is created under Eclipse. But, not in the workspace.
    Please help me out!!!

    Thanks in Advance 🙂

    Reply
  69. pankaj says

    May 18, 2016 at 11:33 AM

    i have face a problem during integrating jenkins when after typing in cmd java – jars jenkins.war
    it show error:Could not create the Java Virtual Machine.
    A fatal exception is occurred .The Prg is Exit. What can i do pls help me.

    Reply
    • Mukesh Otwani says

      May 19, 2016 at 4:25 AM

      Hi Pankaj,

      Please check java properly installed and Java path is set properly

      Reply
  70. Shri says

    May 14, 2016 at 3:18 AM

    Hi Mukesh – Thanks for such a easy to follow tutorial on Jenkins – Selenium Integration. Originally my HF reads which browser to execute from excel. But in Jenkins it started throwing error. So I created three different java classes under the package J_Demo(copied code from HF) gave name as J_chrome, J_ff and J_IE. Basically it will read data from excel as browsers are defined with in these java classes. Converted to Testng test. Created batch file separately, but when I executed them from cmd both Firefox and IE threw error. No issue in chrome, successful test run in Jenkins too. Not sure what is the error in FF and IE. Can you please help? Thanks!

    Reply
  71. Carl Jerich Lague says

    May 11, 2016 at 3:29 PM

    Hi Mukesh!

    Your tutorial is wonderful! However may I ask if Jenkins with selenium integration can be possible with an application ran by C Sharp? I’ve been searching for helpful tutorial but so far this is the most relevant tutorial I have found. Thanks!

    Reply
    • Mukesh Otwani says

      May 11, 2016 at 3:42 PM

      Hey Carl Thanks 🙂 Yes we can easily integrate any C# application with Jenkins. You can trigger batch command or shell script etc from Jenkins.

      Reply
      • Carl Jerich Lague says

        May 11, 2016 at 3:50 PM

        I am trying to trigger c sharp application from selenium then to Jenkins. Is that doable? thanks!

        Reply
        • Mukesh otwani says

          May 12, 2016 at 6:59 PM

          Can you tell me what exactly you want to trigger ? is it a script?

          Reply
  72. Kabirul Islam says

    April 29, 2016 at 4:27 PM

    Nice! Keep it up.

    Reply
    • Mukesh otwani says

      April 30, 2016 at 3:38 PM

      Hey Kabirul thanks keep visiting.

      Reply
  73. reddie2203 says

    April 12, 2016 at 11:34 PM

    Hi mukesh,

    Can you refer me or share me any document on executing selenium webdriver maven scripts on Remote machine (without TestNG) from Jenkins CI tool .

    Reply
    • Mukesh Otwani says

      April 13, 2016 at 10:49 PM

      HI Reddie,

      Why you are not using TestNG? Is there any condition?

      Reply
  74. Satya says

    April 6, 2016 at 1:04 PM

    Hi Mukesh..

    Please share a post regarding how to configure selenium builder file in jenkins and how to execute build remotely.

    Reply
    • Mukesh Otwani says

      April 10, 2016 at 12:21 PM

      Hi Satya,

      I guess Selenium builder is deprecated.

      Reply
  75. Ajit Singh says

    March 28, 2016 at 2:59 PM

    Hi,
    “Here second parameter- specify hours and range will vary from 0-11”
    Range should be from 00-23 not till 11.

    Reply
    • Mukesh Otwani says

      March 28, 2016 at 5:03 PM

      Hi Ajit,

      Thanks I will update the post.

      Reply
  76. Srikanth says

    March 11, 2016 at 5:44 PM

    Hi Mukesh,
    Am facing issue while uploading file in jenkins.Its working normally when i execute on eclipse.But same when i execute
    on jenkins,its not happening.
    Pls help

    Reply
    • Mukesh Otwani says

      March 11, 2016 at 6:31 PM

      Hi Srikanth,

      Are you using Robot class or AutoIt. I use AutoIT and it works normally without any issue.

      Reply
  77. Sanjay Mohan says

    March 5, 2016 at 7:43 PM

    Hi Mukesh,

    I have downloaded the Jenkins war file but while I try installing the file in Cmd prompt I was getting the following error message – ‘java’ is not recognized as an internal or external command,operable program or batch file.

    I tried following three options but nothing worked fine.Please take a look and reply.

    C:UsersOM>java -jar C:UsersOMworkspaceJava_trainingjenkins.war
    ‘java’ is not recognized as an internal or external command,operable program or batch file.
    C:UsersOM>java -jar jenkins.war
    ‘java’ is not recognized as an internal or external command,operable program or batch file.
    C:UsersOM>Java_training -jar jenkins.war
    ‘java’ is not recognized as an internal or external command,operable program or batch file.

    Reply
    • Mukesh Otwani says

      March 7, 2016 at 10:53 AM

      Hi Sanjay,

      It is not jenkins issue its pure java isssue. Java path is not set properly please check and let me know

      Reply
  78. suresh says

    February 23, 2016 at 10:55 PM

    Hi Mukesh,
    i configured Jenkins (i used tomcat for jenkins) with selenium script on my windows 10 system, but sometimes it doesn’t run my test suite properly {it runs in background}. But if i run jenkins on different port by using java -jar jenkins.war then it opens browser and runs whole suite perfectly.
    So what can be the problem with the jenkin with tomcat, it may not open the full screen of browser and not able to identify some elements,is it so? Please guide!!
    Thanks in advance!!

    Reply
    • Mukesh Otwani says

      March 3, 2016 at 2:22 PM

      Hi Suresh,

      In your case script running in headless mode so you are not able to see the execution which creates some sync issues.

      Reply
      • Abhi says

        April 6, 2016 at 9:12 AM

        Hi Mukesh,

        How would you run your tests in browser and not in the background through Jenkins?

        Reply
        • Mukesh Otwani says

          April 10, 2016 at 12:23 PM

          Hi Abhi,

          using Slave machine.

          Reply
  79. SHEKHAR says

    January 26, 2016 at 12:41 AM

    Hi Mukesh,

    Thanks for the article. Very helpful.

    I have a requirement, where, after the code is built and deployed (in DEV environment) we need to execute the test cases automatically (testNG.xml). Can you please assist as to how we can do that via Jenkins ? We are through until deployment and would like to know how to run the test cases after that.

    Thanks !

    Reply
    • Mukesh Otwani says

      March 3, 2016 at 4:38 PM

      Hi Shekhar,

      is this fixed? Sorry for late reply.

      Reply
  80. shruthi says

    January 13, 2016 at 1:37 PM

    Hi,thank you for your reply. fresh new account means ?which account I have to enter their.please tell me what account details I have to pass.IAm new to this feature implementation

    Reply
    • Mukesh Otwani says

      January 17, 2016 at 12:05 AM

      Hi shruthi,

      Fresh account means new gmail account with less security. Just pass uname and password for authentication.

      Reply
  81. shruthi says

    January 8, 2016 at 4:51 PM

    sending emails part is not working.

    I im doing Test configuration by sending test e-mail,iam getting error like Failed to send out e-mail

    javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
    535 5.7.8 https://support.google.com/mail/answer/14257 xi8sm166529246pab.9 – gsmtp

    Please help me

    Reply
    • Mukesh Otwani says

      January 9, 2016 at 5:20 PM

      Hi Shruthi,

      Try with fresh new account it will work for sure. I just tried and its working fine.

      Reply
  82. Mubbashir says

    December 28, 2015 at 3:44 AM

    I’ve configured my project to run the Build with Jenkins if I execute the testng.xml on my own it successfully execute my test case but if I execute via Jenkins I get the following error message

    Build step ‘Execute Windows batch command’ marked build as failure Finished: FAILURE

    However it execute the build successfully if test case output is just using `(system.out.println();)

    if test case relates to opening of browsers it gets failed via Jenkins

    Reply
    • Mukesh Otwani says

      December 29, 2015 at 10:20 PM

      Hi Mubbashir,

      It is java path issue only so try to set the path correctly then it will work I will suggest go with maven project then you wont get this issue.

      Try below code

      java -cp bin;libs/* org.testng.TestNG testng.xml

      Reply
  83. alvin says

    December 22, 2015 at 6:10 PM

    Thanks for the solution Mukesh. It worked
    Just want to get more info for the below scenario.
    In my project am using Page Object Model with maven. I have a suite file to run BVT scripts with some 10 test script class files mapped in the suite file. Here i would like to know, how i can split to run 5 class files in Master and remaining set in slave system.

    Reply
    • Mukesh Otwani says

      December 23, 2015 at 12:29 AM

      Hi Alvin,

      Glad to know that it worked for you :).

      You can configure slave machine and you can create a parameter while will accept machine name as an argument while building project.

      Based on your parameter it will trigger the script in specific machine.

      Please find below link which will help you to setup Master Slave configuration.

      http://learnseleniumtesting.com/jenkins-and-continuous-test-execution/

      Reply
  84. alvin says

    December 10, 2015 at 5:29 PM

    Hi Mukesh,

    I would like to know how we can distribute jobs in master and slave systems. So far i have configured my project to run in master and added a slave system to the build, but the scripts are running only in one system

    Reply
    • Mukesh Otwani says

      December 12, 2015 at 3:55 PM

      Hi Alvin,

      Click on Job > Select checkbox “Select Label where you want to run” > Specify the node name then save.

      Try this and let me know if still facing any issue.

      Reply
  85. Ed Nonog says

    December 3, 2015 at 12:22 PM

    Hi Mukesh,

    I have already configured my Selenium Script from eclipse base from your tutorial including build.xml, pom.xml etc. and I’ve already integrate the selenium script to maven , the tricky part on my instance is on how to import/hook the script into jenkins job or configure?, base from your tutorial you are using windows but my instance is Ubuntu as Jenkins server and svn as my SCM.

    Thanks

    Reply
    • Mukesh Otwani says

      December 3, 2015 at 9:52 PM

      Hi Ed Nonog,

      I have not worked on Linux so no idea on this. I have configured on windows only.

      Reply
  86. sree says

    December 2, 2015 at 9:11 PM

    Hi Mukesh,

    I have one doubt regarding Jenkins Job configuration
    I have configured a Jenkins job to trigger an automated selenium script which is committed in bitbucket & used selenium grid method to run the process in a particular ip.
    For the first time, the build got success. After that for the all consecutive build showing success only. But the script is not running.

    Can you please suggest any option for how to diagnose or how to make the job success for all builds?

    Thanks in advance,
    Sree

    Reply
    • Mukesh Otwani says

      December 2, 2015 at 10:07 PM

      Hi SreeVidhya,

      Can you please check whether it is running correct testng.xml and classes?

      If possible provide me the console log to check the exact issue.

      Reply
  87. saikiran says

    November 29, 2015 at 10:28 AM

    i am getting the error when i drag and drop jenkins.war file beside java -jar in cmd plz help me in this

    Reply
    • Mukesh Otwani says

      November 29, 2015 at 10:35 PM

      What error you are getting..?

      Reply
  88. Bhushan says

    November 17, 2015 at 2:37 PM

    Hi Mukesh.. First of all thanks for the useful tutorial, I am trying out the Jekins with selenium but I want to use the build.xml file in order to execute the test cases instead of .bat file , for this I have to invoke the ant, I have done the initial set up, could you please guide me how to do using build.xml, do I need to create the slave in my case, my selenium setup and jenkins are installed in the local window machine..

    Thanks,
    Bhushan Patil

    Reply
    • Mukesh Otwani says

      November 17, 2015 at 10:58 PM

      Hi Bhushan,

      I would suggest you switch from ANT to Maven and follow below steps

      and if you are new to Maven then use below link https://www.youtube.com/watch?v=nasdb9QhFqg

      But if you are still want to work with ANT http://seleniumeasy.com/ant-tutorials/how-to-run-testng-tests-using-build-xml-file

      Reply
  89. Bhushan says

    November 17, 2015 at 11:39 AM

    Hi Mukesh.. First of all thanks for the useful tutorial, I am running selenium test set up which is running in my local window machine and recently I have installed the Jenkins on my local machine but I have to execute the seleninum test cases using Invoking Ant i.e. basically using running build.xml file, can u please guide me how to do this ?? Do I need to create Slave for this to run the selenium test cases ?

    Reply
  90. suresh says

    November 1, 2015 at 5:53 PM

    Hi Mukesh ,

    1)How to Selected Testcases Executing in Jenkins?
    2)How to Failed Testcases Executing In Jenkins?
    Please help .

    Reply
    • Mukesh Otwani says

      November 2, 2015 at 1:38 AM

      Hi Suresh,

      Please find my comment below

      1)How to Selected Testcases Executing in Jenkins?
      Answer- You can create testng.xml for specific test case and mention this xml in batch file.

      2)How to Failed Testcases Executing In Jenkins?
      Ans- Recently I posted an article on this. Please visit this and implement in your project
      http://learn-automation.com/re-run-selenium-failed-test-cases/

      Hope this will help you.

      Thanks
      Mukesh

      Reply
  91. CGupta says

    October 26, 2015 at 5:52 PM

    Hi Mukesh,

    Can you please explain the same for c#, .Net environment ? We have post on the same over the internet but they are less informative.

    Reply
    • Mukesh Otwani says

      October 26, 2015 at 8:50 PM

      Hi Gupta Ji,

      I have not worked on C# so really not sure.

      Thanks
      Mukesh

      Reply
  92. rachana says

    October 16, 2015 at 2:17 PM

    Hi,
    I am getting the following error when I run selenium batch script from Jenkins. Can anyone help me.
    Building on master in workspace /var/lib/jenkins/workspace/Selenium
    [Selenium] $ /bin/sh -xe /tmp/hudson636620915094945010.sh
    + /usr/bin/winexe -U mysimst/username%password //172.20.68.50 ‘cmd.exe /k cd /d D:\DevOps_Automation & poc_automation.bat & exit’
    Unknown parameter encountered: “max log size”
    Ignoring unknown parameter “max log size”
    Unknown parameter encountered: “passdb backend”
    Ignoring unknown parameter “passdb backend”
    Unknown parameter encountered: “load printers”
    Ignoring unknown parameter “load printers”
    Unknown parameter encountered: “cups options”
    Ignoring unknown parameter “cups options”
    Unknown parameter encountered: “writable”
    Ignoring unknown parameter “writable”
    Unknown parameter encountered: “guest ok”
    Ignoring unknown parameter “guest ok”
    Unknown parameter encountered: “writable”
    Ignoring unknown parameter “writable”

    D:\DevOps_Automation>set projectpath=”D:\DevOps_Automation\AFramework”

    D:\DevOps_Automation>cd “D:\DevOps_Automation\AFramework”

    D:\DevOps_Automation\AFramework>set classpath=”D:\seleniumjar\testng-sources.jar;D:\seleniumjar\selenium-server-standalone-2.44.0.jar;D:\seleniumjar\selenium-java-2.44.0\selenium-2.44.0\selenium-java-2.44.0.jar;D:\seleniumjar\selenium-java-2.44.0\selenium-2.44.0\selenium-java-2.44.0-srcs.jar;C:\TestNG\guice-3.0.jar;C:\TestNG\reportng-1.1.4.jar;C:\TestNG\testng-6.8.21.jar;C:\TestNG\testng-6.8.21-javadoc.jar;C:\TestNG\testng-6.8.21-sources.jar;C:\TestNG\velocity-dep-1.4.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\poi-3.12-20150511.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\poi-examples-3.12-20150511.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\poi-excelant-3.12-20150511.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\poi-ooxml-3.12-20150511.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\poi-ooxml-schemas-3.12-20150511.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\poi-scratchpad-3.12-20150511.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\lib\commons-codec-1.9.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\lib\commons-logging-1.1.3.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\lib\junit-4.12.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\lib\log4j-1.2.17.jar;D:\seleniumjar\poi-bin-3.12-20150511\poi-3.12\ooxml-lib\xmlbeans-2.6.0.jar;D:\DevOps_Automation\AFramework\bin”

    D:\DevOps_Automation\AFramework>java org.testng.TestNG “D:\DevOps_Automation\AFramework”\testng.xml
    [TestNG] Running:
    D:\DevOps_Automation\AFramework\testng.xml

    Started InternetExplorerDriver server (32-bit)
    2.27.0.0
    Listening on port 18880
    log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

    ===============================================
    example suite 1
    Total tests run: 8, Failures: 0, Skips: 8
    Configuration Failures: 1, Skips: 9
    ===============================================

    Build step ‘Execute shell’ marked build as failure
    Finished: FAILURE

    Reply
    • Mukesh Otwani says

      October 16, 2015 at 11:58 PM

      Hi rachana,

      COnfiguration is fine I checked your log and found that you are running very old IE driver 2.27 but latest is 2.48.0..

      I will highly recommend that please update all jars and IE driver and run it again.

      http://learn-automation.com/download-selenium-webdriver-new-version/

      Reply
      • Rachana says

        October 19, 2015 at 10:06 AM

        Hi,
        I updated ie driver but still getting same error.

        Reply
        • Mukesh Otwani says

          October 19, 2015 at 11:44 PM

          Hi Rachana,

          We can have quick session and we can fix this. Add me on Skype will login and fix it soon.

          Skype- sameer5085

          Reply
  93. Sagar says

    October 14, 2015 at 10:22 AM

    Called Function : [logoutToApplication] with parameters [userName],[password]=>todakar.sagar@gmail.com,Zenith123
    Called Function : [findElement] with parameters [elementLocator]=>By.xpath: .//*[@id=’wrapper’]/nav[1]/div[2]/a
    Called Function : [fluentWait] with parameters [locator]=>By.xpath: .//*[@id=’wrapper’]/nav[1]/div[2]/a
    Called Function : [isElementVisible] with parameters [locator]=>By.xpath: .//*[@id=’wrapper’]/nav[1]/div[2]/a
    Element has been Found
    ===============================================
    Suite
    Total tests run: 32, Failures: 4, Skips: 1
    Configuration Failures: 1, Skips: 1
    ===============================================

    Build step ‘Execute Windows batch command’ marked build as failure
    Finished: FAILURE

    please give me solution for above error……………

    Reply
    • Mukesh Otwani says

      October 14, 2015 at 11:46 PM

      its all because of Sync issue.. Try tom use some wait here.. Explicit wait or Fluient wait

      Reply
  94. Mig says

    October 2, 2015 at 9:23 PM

    has anyone seen this error and how to fix it:?
    Thanks in Advance

    Error: Could not find or load main class org.testng.TestNG
    Build step ‘Execute Windows batch command’ marked build as failure
    Finished: FAILURE

    Reply
    • Mukesh Otwani says

      October 4, 2015 at 1:49 AM

      Hi Mig,

      There is some TestNG classpath issue. Please make sure that in testng.xml you have given classname with package.

      Reply
  95. Prashant says

    September 22, 2015 at 6:57 AM

    I am trying to run tests from Jenkins on my local but it just does not show browser running. I am able to trigger same testng test via OSX terminal (my local). Not sure what is different while trying to run the same testng.xml file from jenkins.

    Error message –

    [TestNG] Running:
    /Users/Shared/Jenkins/Home/workspace/TestJenkins/testng1.xml

    Execute initialize function
    Execute reportSetup
    the main directory you are searching does exist : true
    Execute test case SearchMisftToyz
    log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
    log4j:WARN Please initialize the log4j system properly.
    Signing in to application
    Verifying if Homepage is open
    Selecting Status
    org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with
    Command duration or timeout: 10.05 seconds
    Build info: version: ‘2.47.1’, revision: ‘411b314’, time: ‘2015-07-30 03:03:16’
    System info: host: ‘Prashants-MacBook-Pro-2.local’, ip: ‘169.254.116.237’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.10.5’, java.version: ‘1.8.0_60’
    Driver info: org.openqa.selenium.firefox.FirefoxDriver
    Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=40.0.3, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
    Session ID: 96c33170-a15e-4140-88d0-308ba32e9960
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
    at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:273)
    at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
    at com.selenium.page.RentalLogHomePage.filterByStatusAndTeam(RentalLogHomePage.java:173)
    at com.selenium.tests.RentalLogTests.SearchMisftToyz(RentalLogTests.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.TestNG.privateMain(TestNG.java:1364)
    at org.testng.TestNG.main(TestNG.java:1333)
    Caused by: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with
    Build info: version: ‘2.47.1’, revision: ‘411b314’, time: ‘2015-07-30 03:03:16’
    System info: host: ‘Prashants-MacBook-Pro-2.local’, ip: ‘169.254.116.237’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.10.5’, java.version: ‘1.8.0_60’
    Driver info: driver.version: unknown
    at .fxdriver.preconditions.visible(file:///var/folders/7t/bnx7__gx159fm92d4_kbnpx800007q/T/anonymous2659449284267887507webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:9982)
    at .DelayedCommand.prototype.checkPreconditions_(file:///var/folders/7t/bnx7__gx159fm92d4_kbnpx800007q/T/anonymous2659449284267887507webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12626)
    at .DelayedCommand.prototype.executeInternal_/h(file:///var/folders/7t/bnx7__gx159fm92d4_kbnpx800007q/T/anonymous2659449284267887507webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12643)
    at .fxdriver.Timer.prototype.setTimeout/<.notify(file:///var/folders/7t/bnx7__gx159fm92d4_kbnpx800007q/T/anonymous2659449284267887507webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:623)
    java.lang.Exception: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with
    Command duration or timeout: 10.05 seconds
    Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
    System info: host: 'Prashants-MacBook-Pro-2.local', ip: '169.254.116.237', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_60'
    Driver info: org.openqa.selenium.firefox.FirefoxDriver
    Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=40.0.3, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
    Session ID: 96c33170-a15e-4140-88d0-308ba32e9960
    at com.selenium.page.RentalLogHomePage.filterByStatusAndTeam(RentalLogHomePage.java:492)
    at com.selenium.tests.RentalLogTests.SearchMisftToyz(RentalLogTests.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.TestNG.privateMain(TestNG.java:1364)
    at org.testng.TestNG.main(TestNG.java:1333)
    Caused by: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with
    Command duration or timeout: 10.05 seconds
    Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
    System info: host: 'Prashants-MacBook-Pro-2.local', ip: '169.254.116.237', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_60'
    Driver info: org.openqa.selenium.firefox.FirefoxDriver
    Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=40.0.3, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
    Session ID: 96c33170-a15e-4140-88d0-308ba32e9960
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
    at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:273)
    at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
    at com.selenium.page.RentalLogHomePage.filterByStatusAndTeam(RentalLogHomePage.java:173)
    … 24 more
    Caused by: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with
    Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
    System info: host: 'Prashants-MacBook-Pro-2.local', ip: '169.254.116.237', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_60'
    Driver info: driver.version: unknown
    at .fxdriver.preconditions.visible(file:///var/folders/7t/bnx7__gx159fm92d4_kbnpx800007q/T/anonymous2659449284267887507webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:9982)
    at .DelayedCommand.prototype.checkPreconditions_(file:///var/folders/7t/bnx7__gx159fm92d4_kbnpx800007q/T/anonymous2659449284267887507webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12626)
    at .DelayedCommand.prototype.executeInternal_/h(file:///var/folders/7t/bnx7__gx159fm92d4_kbnpx800007q/T/anonymous2659449284267887507webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12643)
    at .fxdriver.Timer.prototype.setTimeout/<.notify(file:///var/folders/7t/bnx7__gx159fm92d4_kbnpx800007q/T/anonymous2659449284267887507webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:623)
    org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with
    Command duration or timeout: 10.05 seconds
    Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
    System info: host: 'Prashants-MacBook-Pro-2.local', ip: '169.254.116.237', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_60'
    Driver info: org.openqa.selenium.firefox.FirefoxDriver
    Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=40.0.3, platform=MAC, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
    Session ID: 96c33170-a15e-4140-88d0-308ba32e9960
    Terminating Browser

    ===============================================
    Suite1
    Total tests run: 1, Failures: 1, Skips: 0
    ===============================================

    Reply
    • Mukesh Otwani says

      September 22, 2015 at 8:32 PM

      HI Prashant,

      I can see that you are able to execute test. As per error log I found that below article will help you.

      http://learn-automation.com/solve-elementnotvisibleexception-in-selenium-webdriver/

      Please try and let me know if any other help required.

      Thanks 🙂

      Reply
  96. Karthik says

    September 4, 2015 at 10:43 AM

    Hi Mukesh,
    Thanks for the wonderful demo…
    I have run the scripts using bat file and it works perfectly…

    How to run the jenkins job using Shell script…?

    Reply
    • Mukesh Otwani says

      September 7, 2015 at 5:30 PM

      Hi Karthik,

      I have not tried with shell script so no idea. Sorry.

      I will check and let u know if any useful link or video.

      Reply
      • Karthik says

        September 7, 2015 at 5:55 PM

        Hi Mukesh,
        Thanks for the reply…
        One more question..?
        I have written automation script using windows operating system and than I uploaded same set of files to linux server. In windows jenkins works perfectly and not in linux.? If we need to set separate classpath in linux?

        Reply
  97. nitin82 says

    August 19, 2015 at 5:37 PM

    Hi Mukesh, all the steps are beautifully described.

    Thank you very much for helping out others.

    Am getting stuck in command prompt, receiving error on executing C:UsersNitin_2\JenkinsDemo>java org.testng.TestNG testng.xml that says
    [TestNG] [ERROR]
    Cannot find class in classpath: demoJenkins.DemoJenkinsJobs.

    Am not sure what could go wrong while performing all the steps as mentioned in the video.

    Kindly revert back with a possible solution.

    Thank you!

    Reply
    • Mukesh otwani says

      August 20, 2015 at 12:02 AM

      check this path again C:UsersNitin_2\JenkinsDemo

      seems very small issue while giving class name

      Please make sure before running classpath is set

      Reply
      • nitin82 says

        August 20, 2015 at 6:12 PM

        It was trivial! Sorry to bug you. 🙂

        I was able to execute it successfully!

        Will be going through other videos of yours.

        Thank you very much.

        Reply
        • Mukesh otwani says

          August 20, 2015 at 8:59 PM

          Cheers Nitin

          Reply
        • Karl El says

          April 28, 2016 at 2:17 PM

          Hey Nitin, how did you resolve this ?

          Reply
          • Mukesh Otwani says

            April 28, 2016 at 7:13 PM

            Hey Karl,

            is ur issue fixed?

  98. Ravi Kanth says

    August 19, 2015 at 11:51 AM

    i have run the scripts on my laptop i have create batfile but not working just open and close the window not running in cmd plz give me solution

    Reply
    • Mukesh otwani says

      August 20, 2015 at 12:00 AM

      What is the build status is it pass or fail?

      have u referred my youtube video for the same please have a look and try the same

      https://youtu.be/1e8I3A49ERc

      Reply
  99. Ravi Kanth says

    August 19, 2015 at 11:43 AM

    hi mukesh
    i have one doubt. how to install jenkins

    Reply
  100. mike comtrox says

    May 18, 2015 at 12:06 PM

    Hi Mukesh,

    there is one more query to bug you .If we have to run the script on any remote machine than where we will give the machine details(Computer name, username/password) as input. actually what will be the exact way to do this.

    Thanks.

    Reply
  101. Manne Rakesh says

    May 8, 2015 at 6:42 PM

    Nice information Mukesh Thanks

    Reply
    • Mukesh Otwani says

      May 8, 2015 at 10:02 PM

      Hi Rakesh,

      Thanks Keep Visiting and Sharing 🙂

      Reply
  102. mike comtrox says

    April 21, 2015 at 5:18 PM

    if I am placing my project to any remote repository . how will I give jar file mapping as in Local system we can associate/map jar files from eclipse using java Build path option

    Reply
    • Mukesh Otwani says

      April 21, 2015 at 7:03 PM

      Hi Mike,

      Really nice question, let me explain you in detail. In your case you have to use Maven project and then you have to configure Maven in Jenkins as well. After config setting create a goal in pom.xml and run Jenkins job based on this pom.xml. This will download all jars from server itself before running your build.

      Hope its clear. Soon I will share an article on this itself.

      In mean while you can check below article on Maven

      http://learn-automation.com/integration-of-selenium-with-maven-and-create-build-for-continuous-integration/

      Reply
      • mike comtrox says

        May 8, 2015 at 5:37 PM

        Hi Mukesh,

        Thanks for your response , is there any other way to do this apart from using Maven project . Like giving this mapping during runtime with the help of classpath .

        Reply
        • Mukesh Otwani says

          May 8, 2015 at 10:02 PM

          Hi Mike,

          for run time configuration I am not sure because I have not done so far.I will check and will update you

          Reply
  103. Rajasekhar Jangala says

    April 14, 2015 at 12:05 PM

    very helpful thanks a lot

    Reply
    • Mukesh Otwani says

      April 16, 2015 at 8:38 AM

      Thanks Raja.. Keep Visiting 🙂

      Reply
  104. amitaks says

    March 18, 2015 at 9:20 AM

    Good stuff !!

    Reply
    • Mukesh Otwani says

      March 18, 2015 at 9:53 AM

      Thanks 🙂

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Free Selenium Videos

https://www.youtube.com/watch?v=w_iPCT1ETO4

Search topic

Top Posts & Pages

  • Selenium Webdriver tutorial for beginners
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Selenium Webdriver C# Tutorial
  • WHAT ARE YOUR EXPECTATIONS FROM US?

Stay connected via Facebook

Stay connected via Facebook

Archives

Footer

Categories

Recent Post

  • API Testing Using Postman And RestAssured
  • Disable Personalise Your Web Experience Microsoft Edge Prompt In Selenium
  • How To Fix Error: No tests found In Playwright
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Best and easy way to Group test cases in selenium

Top Posts & Pages

  • Selenium Webdriver tutorial for beginners
  • How To Fix Eclipse Autocomplete Or Code Suggestion In Eclipse
  • Selenium Webdriver C# Tutorial
  • WHAT ARE YOUR EXPECTATIONS FROM US?