CompareTo with Image parameter fails

  • Faizal

    Faizal - 2010-02-04

    I'm trying to use the CompareTo command which takes in an Image parameter but it is failing with the following:

    java.lang.ClassCastException: cannot be cast to java.lang.String
    at com.tplan.robot.scripting.commands.impl.CompareToCommand.validate(
    at com.tplan.robot.scripting.commands.impl.CompareToCommand.execute(
    at com.tplan.robot.scripting.AbstractJavaTestScript.runScriptCommand(
    at com.tplan.robot.scripting.DefaultJavaTestScript.compareTo(
    at com.tplan.robot.scripting.DefaultJavaTestScript.compareTo(

    I see the line in the source code where it is checking if SearchImageComparisonModule is an instanceof ImageComparisonModule but not sure why it is failing since - according to the javadoc - SearchImageComparisonModule implements ImageComparisonModule.

  • Robert Pes

    Robert Pes - 2010-02-04

    It is a bug. I filed it as 2946068. The fix is simple - the parameter should not be casted to String in Will be fixed in next release (2.0.3).


Log in to post a comment.