}
}
private Condition getConditionFromConfig(com.crawljax.web.model.Condition c) {
Condition condition = null;
Identification id = null;
switch (c.getCondition()) {
case url:
condition = new UrlCondition(c.getExpression());
break;
case notUrl:
condition = new NotUrlCondition(c.getExpression());
break;
case javascript:
condition = new JavaScriptCondition(c.getExpression());
break;
case regex:
condition = new RegexCondition(c.getExpression());
break;
case notRegex:
condition = new NotRegexCondition(c.getExpression());
break;
case visibleId:
id = new Identification(How.id, c.getExpression());
condition = new VisibleCondition(id);
break;
case notVisibleId:
id = new Identification(How.id, c.getExpression());
condition = new NotVisibleCondition(id);
break;
case visibleText:
id = new Identification(How.text, c.getExpression());
condition = new VisibleCondition(id);
break;
case notVisibleText:
id = new Identification(How.text, c.getExpression());
condition = new NotVisibleCondition(id);
break;
case visibleTag:
id = new Identification(How.tag, c.getExpression());
condition = new VisibleCondition(id);
break;
case notVisibleTag:
id = new Identification(How.tag, c.getExpression());
condition = new NotVisibleCondition(id);
break;
case xPath:
condition = new XPathCondition(c.getExpression());
break;