use of com.seleniumtests.customexception.DriverExceptions in project seleniumRobot by bhecquet.
the class StubTestClass method testWithException.
@Test(groups = "stub")
public void testWithException() {
count++;
TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), maskPassword);
step1.addAction(new TestAction(String.format("played %d times", count), false, new ArrayList<>()));
step1.addAction(new TestAction("click button", false, new ArrayList<>()));
TestStepManager.logTestStep(step1);
throw new DriverExceptions("some exception");
}
use of com.seleniumtests.customexception.DriverExceptions in project seleniumRobot by bhecquet.
the class StubTestClass method testWithExceptionAndMaxRetryIncreasedWithLimit.
/**
* Increase max retry above limit
*/
@Test(groups = "stub")
public void testWithExceptionAndMaxRetryIncreasedWithLimit() {
count++;
TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), maskPassword);
step1.addAction(new TestAction(String.format("played %d times", count), false, new ArrayList<>()));
step1.addAction(new TestAction("click button", false, new ArrayList<>()));
TestStepManager.logTestStep(step1);
try {
throw new DriverExceptions("some exception");
} finally {
if (count < 4) {
increaseMaxRetry();
}
}
}
use of com.seleniumtests.customexception.DriverExceptions in project seleniumRobot by bhecquet.
the class StubTestClassForEncoding method testWithChainedException.
@Test(groups = "stub")
public void testWithChainedException() {
TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), true);
step1.addAction(new TestAction("click button", false, new ArrayList<>()));
TestStepManager.logTestStep(step1);
throw new DriverExceptions("& some exception \"with \" <strong><a href='http://someurl/link' style='background-color: red;'>HTML to encode</a></strong>", new DriverExceptions("root <error>"));
}
Aggregations