All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.objogate.wl.swing.driver.JPasswordFieldDriver Maven / Gradle / Ivy

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 parentOrOwner, ComponentSelector componentSelector) {
        super(parentOrOwner, componentSelector);
    }

    public JPasswordFieldDriver(ComponentDriver parentOrOwner, Class componentType, Matcher... 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");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy