1

if I run my test suite (Selenium WebDriver) with test cases giving text output only using

System.out.println("some text");

Build status is successful using Jenkins

But

whenever it comes to the step where (sendKeys) involved build gets failed status with following message

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

e.g step

driver.findElement(By.id("lst-ib")).sendKeys("test");

Do i need to use headless browser or any plug-in to achieve success

Following is the content of run.bat file

java -cp bin;lib/* org.testng.TestNG testng.xml 
3
  • May be your batch file has some issue? Dec 31, 2015 at 4:12
  • Does the test runs fine when used without jenkins? Dec 31, 2015 at 13:37
  • yes it does well if I execute the command written in bat file via command prompt after setting classpath let me include the command written in run.bat file on main thread
    – Hassan
    Dec 31, 2015 at 15:33

1 Answer 1

1

Your error indicates that your batch file is throwing an unhandled exception. Likely this is something like "element not found". Your log files will tell you more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.