I have a string
String pat = "HelloWorld#$%!";
@FindBy(xpath = "//*[contains(text(), 'Best Choice')]")
WebElement button;
final String format = String.format("%s", pat);
final String format = String.format("%s=!", pat);
button.getText().contains(format);
When I'm trying to compare my button with text fails with java.util.UnknownFormatConversionException: Conversion = '!'
Aucun commentaire:
Enregistrer un commentaire