Problem in specifying passrate in compareTo

  • Aanchal Gupta

    Aanchal Gupta - 2010-04-15


    I always get error when I try to specify the 'passrate' in compareTo method.
    I will get an exception at this line:
    int result = compareTo(new File { new File("/home/screenshots/roses.png") }, "search", (float) 95.0);

    Error Logs:
    java.lang.ClassCastException: java.lang.Float 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(
    at com.mypackage.TestClassWhichIsNotWorking.test(

    This error does not occur when I use passrate in waitForMatch function.
    Pls suggest a solution to this if I wish to use compareTo.

  • Robert Pes

    Robert Pes - 2010-04-15

    Not reproducible on my environment. The position mentioned in the stack trace doesn't refer to a valid place in the code any more. I suggest you to retry with the version which is about to release.

  • Aanchal Gupta

    Aanchal Gupta - 2010-04-19

    yeah…it works with 2.0.4  
    Thanks.. :)


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks