Skip to content

Unable to give inputes in debug console vs code while running junit with cucumber java project #1696

Open
@iamgowthaman

Description

@iamgowthaman

I'm using java maven selenium with cucumbe project. i need to give input like otp and some other input while executing the test case. In vs code unable to give, my test is running in Debug console so how should i give there.

Getting this issue
Fail or Pass
pass
Unrecognized request: { _request: evaluate }

can someone please help me on this issue.

my sample code

`package cucumber.Options;

import io.cucumber.junit.Cucumber;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@io.cucumber.junit.CucumberOptions(features = "src/test/java/features/driverTesting.feature", glue = {
"stepDefinations" }, stepNotifications = true,
dryRun = false,
plugin= {"html:target/cucumber.html", "json:target/cucumber.json",
"com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:",
"rerun:target/failed_scenarios.txt"}
)
public class DriverTesting {
}`

`Feature: Browser Driver Testing

Scenario: Verify the jenkins browser
Given Verify the browser in jenkins`

` @given("Verify the browser in jenkins")
public void verifyTheBrowserInJenkins() throws InterruptedException, IOException {

	Scanner scanner = context.objectManager.getScanner();
	System.out.println("Fail or Pass");
	TestContext.txn_status = scanner.nextLine();
	System.err.println(TestContext.txn_status);

}`
Screenshot 2024-06-04 at 9 59 55 PM Screenshot 2024-06-04 at 10 00 28 PM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions