Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectByValueFromTarget: @Step-annotation having problems resolving String[] for report #3571

Open
JohannesProbst opened this issue Nov 13, 2024 · 0 comments

Comments

@JohannesProbst
Copy link

What happened?

Using the class net.serenitybdd.screenplay.ui.Select like

actor.attemptsTo(Select.value("foo").from(dropDownLabeled("bar")));

public static SearchableTarget dropDownLabeled(String label) {
		return XPathOrCssTarget.the("%s-Dropdown".formatted(label))
				.locatedBy("//label[@for = '{0}']/select").of(label);
	}

results in the following report-text
User selects [Ljava.lang.String;@74b1accc in bar-Dropdown

What did you expect to happen?

the generated report should quote User selects foo in bar-Dropdown.

Serenity BDD version

serenity-screenplay-webdriver 4.1.3

JDK version

17

Execution environment

No response

How to reproduce the bug.

Use the class net.serenitybdd.screenplay.ui.Select like

actor.attemptsTo(Select.value("foo").from(dropDownLabeled("bar")));

public static SearchableTarget dropDownLabeled(String label) {
		return XPathOrCssTarget.the("%s-Dropdown".formatted(label))
				.locatedBy("//label[@for = '{0}']/select").of(label);
	}

and generate the report.

How can we make it happen?

Work on this myself and propose a PR (with Serenity BDD team guidance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant