com.github.siwenyan.si.SiCommandExecutorVerify Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of side Show documentation
Show all versions of side Show documentation
Java runner of Selenium IDE project
package com.github.siwenyan.si;
class SiCommandExecutorVerify extends SiCommandExecutor {
@Override
public void execute(SiCommand command, SiContext siContext) throws SiVerifyException {
String expected = siContext.dynamic(command.getSiModelCommand().getValue(), "", "").trim();
String actual = siContext.getVarValue(command.getSiModelCommand().getTarget()).trim();
siContext.getReporter().reportMessage("expected: [" + expected + "]");
siContext.getReporter().reportMessage("actual: [" + actual + "]");
if (!actual.equals(expected)) {
throw new SiVerifyException(
"Assert fail:\r\n" +
"\tExpected: [" + expected + "]\r\n" +
"\tActual: [" + actual + "]");
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy