}
public void doExecute() throws Exception {
LOG.debug("Selecting WebClient " + getName());
final WebClientContext wcc = getContext().getCurrentWebClientContext();
getContext().defineCurrentWebClientContext(getName());
final Page currentResponse = getContext().getCurrentResponse();
final String message;
if (currentResponse == null)
{
message = "No current response";
}
else
{
message = "Current response is now: " + currentResponse.getWebResponse().getRequestUrl();
}
LOG.debug(message);
if (!getSteps().isEmpty())
{
try
{
executeContainedSteps();
}
finally
{
LOG.debug("Restoring WebClientContext " + wcc.getName());
getContext().defineCurrentWebClientContext(wcc.getName());
}
}
}