I have a problem and I do not know how to solve it. I have a class:
public class PasswordValidator {
private Pattern pattern;
private Matcher matcher;
private static final String PASSWORD_PATTERN =
"((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{6,20})";
public PasswordValidator(){
pattern = Pattern.compile(PASSWORD_PATTERN);
}
public boolean validate(final String password){
matcher = pattern.matcher(password);
return matcher.matches();
}
}
I would like to add a result from a PasswordValidator.java class to an element that I call in the ReadData.java class,
Public class ReadData extends PasswordValidator {
Private static final String DIRECTORY_NAME = "C: \\ Users \\ Damian6666 \\ workspace846 \\ ChangePasswordAutomat1 \\ File.xlsx";
Public ReadData () throws Exception {
super();
}
Public void tc () throws IOException, InterruptedException, InvalidFormatException {
WebDriver driver = new FirefoxDriver ();
Driver.get ("https://profil.wp.pl/login.html?url=https%3A%2F%2Fpoczta.wp.pl%2Findexgwt.html%3Fflg%3D1&services=new_window_wp");
driver.findelement(By.id("password"))
Does anyone have any idea how to do this?