|
|
|
|
|
|
|
|
|
|
Re: Extend Jubula [message #759876 is a reply to message #759840] |
Wed, 30 November 2011 12:54 |
Tommy R Messages: 32 Registered: October 2011 Location: Hamburg |
Member |
|
|
Finally it's running now, at least somehow.
First of all: Thanks for the hint with the (hidden) log-file, this one helped a lot.
We did not get a UnsupportedComponentException, so our class has been found. On strict search, we found a org.eclipse.swt.SWTException: Invalid thread access involving our public method in the ImplClass. So we made a syncExec on the display of the component, so it looks like this now:
package org.eclipse.jubula.rc.swt.implclasses;
import org.eclipse.jubula.rc.common.implclasses.Verifier;
public class CanvasImplClass extends ControlImplClass {
public void verifyControlData(final String key, final String expectedValue) {
final Control component = getComponent();
component.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
Object data = component.getData(key);
if (data != null) {
Verifier.equals(expectedValue, data.toString());
} else {
Verifier.equals(expectedValue, "");
}
}
});
}
}
That fixed the org.eclipse.swt.SWTException: Invalid thread access.
Now we still get the Configuration error, but the log file says: org.eclipse.jubula.rc.common.exception.StepVerifyFailedException: Expected 'xyz' but was ''
Now I'd like to know, how you can make this a simple Check Error, like the checks in the unbound_xyz-libraries.
Regards.
|
|
|
|
Re: Extend Jubula [message #759891 is a reply to message #759876] |
Wed, 30 November 2011 13:47 |
|
Tommy R wrote on Wed, 30 November 2011 13:54
if (data != null) {
Verifier.equals(expectedValue, data.toString());
} else {
Verifier.equals(expectedValue, "");
}
}
The Verifier will throw an Exception if its condition is not met. Since your expected value is "xyz" and your real value is "" (from data==null oder from the actual value) this counts as an verification error.
|
|
|
Re: Extend Jubula [message #759904 is a reply to message #759891] |
Wed, 30 November 2011 14:13 |
Tommy R Messages: 32 Registered: October 2011 Location: Hamburg |
Member |
|
|
Ok, the problem was, that the verification (Verifier.equals(...)) was handled inside of the runnable, which did not work. We now use the getEventThreadQueuer().invokeAndWait to get the control data and after that we use the Verifier (outside of the runnable) like it was done in the LabelImplClass for example.
Thanks at all for the help.
Regards,
Tommy
[Updated on: Wed, 30 November 2011 14:13] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05400 seconds