You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by MaxenceBontePE December 8, 2023
Hi,
I have a plain XPathOrCssTarget
public static final Target LIBELLE_COMPETENCE_NUMERO = XPathOrCssTarget
.the("libellé de la compétence numéro {0}")
.locatedBy("#competence-clef li:nth-child({0}) .media-body > span > span");
then I use it (in a loop) to remember values
for (int i =0 ; i < CandidatForm.LIBELLE_COMPETENCE.resolveAllFor(actor).size() ; i++) {
actor.remember("compétence" + i, CandidatForm.LIBELLE_COMPETENCE_NUMERO.of(String.valueOf(i+1)));
}
and then I ensure the same field later has the same value as stored
for (int i =0 ; i < (int) actor.recall("nb compétences clé") ; i++) {
actor.attemptsTo(
Ensure.that(CandidatForm.LIBELLE_COMPETENCE_NUMERO.of(String.valueOf(i+1)))
.hasValue(actor.recall("compétence" + i))
);
}
but I get the following exception
[ERROR] class net.serenitybdd.screenplay.targets.XPathOrCssTarget cannot be cast to class java.lang.String (net.serenitybdd.screenplay.targets.XPathOrCssTarget is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
Did I get something wrong or is this a bug ?
I have penty of Ensures on plain Targets (Target.the("").located(By.something("somethingelse")) having values and recalls and it works fine.
The text was updated successfully, but these errors were encountered:
Discussed in #3350
Originally posted by MaxenceBontePE December 8, 2023
Hi,
I have a plain XPathOrCssTarget
then I use it (in a loop) to remember values
and then I ensure the same field later has the same value as stored
but I get the following exception
Did I get something wrong or is this a bug ?
I have penty of Ensures on plain Targets (Target.the("").located(By.something("somethingelse")) having values and recalls and it works fine.
The text was updated successfully, but these errors were encountered: