SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.86k stars 8.22k forks source link

[๐Ÿ› Bug]: step definition that is not reconized in feature files #12885

Closed DomZZ closed 1 year ago

DomZZ commented 1 year ago

What happened?

I added a step definition with a param (regular expression that should accept 2 different strings (collapse or expand) then in the C# method I know how to behave depending on the param value.

But the step definition that is not reconized in feature files...

How can we reproduce the issue?

[When(@"I click on summary card ""(expand|collapse)"" button")]
public void WhenIClickOnSummaryCardCollapseExpandButton(string cardAction)
{
   throw new PendingStepExpception();
}

But I've observed that if there is other params it works :

[When(@"I click on summary card ""(expand|collapse)"" button with label ""([^""]*)""")]
public void WhenIClickOnSummaryCardCollapseExpandButton(string cardAction, string label)
{
   throw new PendingStepExpception();
}

Relevant log output

nothing relevant, check feature file

Operating System

Windows 11

Selenium version

4.13.1

What are the browser(s) and version(s) where you see this issue?

Chrome 117

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 117

Are you using Selenium Grid?

no

github-actions[bot] commented 1 year ago

@DomZZ, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

github-actions[bot] commented 1 year ago

Hi, @DomZZ. Please follow the issue template, we need more information to reproduce the issue.

Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue.

Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough.

Reply to this issue when all information is provided, thank you.

titusfortner commented 1 year ago

This looks like a cucumber or specflow issue, not something for Selenium. I'll add some links for where else to ask questions in case someone else might be able to help.

github-actions[bot] commented 1 year ago

๐Ÿ’ฌ Please ask questions at:

github-actions[bot] commented 12 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.