I am trying to automate the below scenario using karate UI automation
Feature: Background: Using callonce and calling the login feature which launches the url and enter username/passowrd and click login.
Scenario: Perform some steps with the open browser
Scenario: Perform some other steps with the same browser
Problem: first scenario executes perfectly and the browser remains open after that. But on executing second scenario, it is not able to identify the objects in the opened browser
Note: I have configured the driver in Karate-config.js as below karate.configure('driver', { type: 'chrome', executable: 'C:\Program Files\Google\Chrome\Application\chrome.exe',addOptions: ["--remote-allow-origins=*"]});
As a workaround, i tried using call instead of callonce while calling the login feature in background. In that case both scenario works fine but the browser closes after first scenario and login action is called again before starting the second scenario. I am trying to avoid this multiple login steps to reduce the execution time