com.objogate.wl.swing.driver.JPasswordFieldDriver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of windowlicker-swing Show documentation
Show all versions of windowlicker-swing Show documentation
This is the Windowlicker Swing library.
The newest version!
package com.objogate.wl.swing.driver;
import javax.swing.JPasswordField;
import java.awt.Component;
import org.hamcrest.Matcher;
import com.objogate.exception.Defect;
import com.objogate.wl.Prober;
import com.objogate.wl.swing.ComponentSelector;
import com.objogate.wl.swing.gesture.GesturePerformer;
public class JPasswordFieldDriver extends JTextComponentDriver {
public JPasswordFieldDriver(GesturePerformer gesturePerformer, ComponentSelector componentSelector, Prober prober) {
super(gesturePerformer, componentSelector, prober);
}
public JPasswordFieldDriver(ComponentDriver extends Component> parentOrOwner, ComponentSelector componentSelector) {
super(parentOrOwner, componentSelector);
}
public JPasswordFieldDriver(ComponentDriver extends Component> parentOrOwner, Class componentType, Matcher super JPasswordField>... matchers) {
super(parentOrOwner, componentType, matchers);
}
@Override
public void hasText(String expectedText) {
throw new Defect("selecting or inspecting text from a password field is not allowed");
}
@Override
public void hasText(Matcher matcher) {
throw new Defect("selecting or inspecting text from a password field is not allowed");
}
@Override
public void hasSelectedText(String expected) {
throw new Defect("selecting or inspecting text from a password field is not allowed");
}
@Override
public void hasSelectedText(Matcher matcher) {
throw new Defect("selecting or inspecting text from a password field is not allowed");
}
}