1

I have a scenario where I have to log in to an application and the entire set of regression suite should run with a single sign-in and should log out at the end of the suite. The challenge which I'm currently facing is my browser invocation works for the first scenario but for the second scenario onwards it is not able to identify the driver configurations and throws an org.graalvm.polyglot.PolyglotException: ReferenceError: "waitFor" is not defined error message. Approaches I have tried to solve this issue are as follows:

  1. I defined the driver configurations at the karate.config file as follows : if (env == 'chrome') { karate.configure('driver', { type: 'chromedriver', port: 9515, executable: 'src/test/java/drivers/chromedriver.exe',stop : false });
  2. I tried defining the driver configurations at background level.
  3. The concern with defining the driver configurations at each scenario level is that the browser instance is closed and a new instance opens up and that is not the expected flow in my case.
mn3094
  • 101
  • 1
  • 3

0 Answers0