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 
  • May be your batch file has some issue? – Helping Hands Dec 31 '15 at 4:12
  • Does the test runs fine when used without jenkins? – TestingWithArif Dec 31 '15 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 '15 at 15:33
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, privacy policy and cookie policy

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