Running Cucumber Headlessly

Hello everyone, Im trying to run my cucumber test in headless mode. When it tries to navigate to my appian URL, the testcases will pass however when it tries to login, cucumber will throw a NullPointerException error. please see below for the stack trace:

<error type="java.lang.NullPointerException">java.lang.NullPointerException
  at com.appiancorp.ps.automatedtest.tempo.TempoLogin.navigateToLoginPage(TempoLogin.java:214)
  at com.appiancorp.ps.automatedtest.fixture.BaseFixture.loginIntoWithUsernameAndPassword(BaseFixture.java:395)
  at com.appiancorp.ps.automatedtest.fixture.BaseFixture.loginIntoWithUsername(BaseFixture.java:427)
  at com.appiancorp.ps.automatedtest.fixture.BaseFixture.loginWithUsername(BaseFixture.java:438)
  at com.appiancorp.ps.cucumber.fixtures.CucumberBaseFixture.loginWithUsername(CucumberBaseFixture.java:65)
  at ✽.I login with username &quot;John_Doe&quot;(src/test/resources/TempoNavigationExample.feature:20)
</error>
I am suspecting that the browser is either not displaying Appian URL or that it cant find the elements for input. please do help. Thank you.

  Discussion posts and replies are publicly visible

Parents
  • Hello Rabiah, 

    Some questions,

    * I assume this is happening with Chrome? do you have multiple profiles? are u using the same driver that comes with the installation of the cucumber? 

    * are you able to run it with head? does it works? 

    * which version of the cucumber for Appian are you using and which version of Appian are both 19.1? 

    * try to kill all the chromes drivers which could be open and additionally try to remove all the browsing history and everything possible to delete from the browser. 

    well try and let us know your answers so we can help you better

    Jose 

  • Hi Jose, thank you so much for your response. 

    * I assume this is happening with Chrome? do you have multiple profiles? are u using the same driver that comes with the installation of the cucumber?

    Ans -> Its a standalone driver

    * are you able to run it with head? does it works? 

    Ans -> Yes

    * which version of the cucumber for Appian are you using and which version of Appian are both 19.1? 

    Ans -> 19.1

    * try to kill all the chromes drivers which could be open and additionally try to remove all the browsing history and everything possible to delete from the browser. 

    Ans -> The driver is unable to launch the chrome hence i think there were no chrome drivens being open

    Anwyay, I have troubleshooted this problem. it seems that problem lies with the chromedriver itself. I have verified that all chrome depedancies have been installed correcrly but something wa smissing to lauch chrome. i have managed to find a chrome luancher script online and threw it in the chrome driver installed directory and it worked :) definitiely a tedious process and i will be finiding an easier solution to this

  • 0
    Certified Lead Developer
    in reply to Rabiah Khairy

    Would you happen to have more details on how you managed to run Cucumber headlessly?

    Thanks,

    Mat

  • hello, sorry late reply. Im currently able to dockerized my Cucumber so its running headlessly at the moment. Create your docker environment, and load all the necessary files in the image, u will also have to locate your chrome driver there too. basically mirror whatever's in your local

Reply Children
No Data