List of usage examples for org.apache.wicket.extensions.markup.html.captcha CaptchaImageResource getChallengeId
public final String getChallengeId()
From source file:org.apache.openmeetings.web.pages.auth.TestLoginUI.java
License:Apache License
private String getCaptcha(String path) throws ReflectiveOperationException, SecurityException { // hacks with reflection Image captchaImg = (Image) tester.getComponentFromLastRenderedPage(path); Method m1 = Image.class.getDeclaredMethod("getImageResource"); m1.setAccessible(true);//from w w w .j a va 2 s . com CaptchaImageResource captcha = (CaptchaImageResource) m1.invoke(captchaImg); Method m2 = CaptchaImageResource.class.getDeclaredMethod("getImageData", Attributes.class); m2.setAccessible(true); m2.invoke(captcha, (Attributes) null); return captcha.getChallengeId(); }