Sahi处理嵌套的else-if语句吗?

问题描述:

Sahi脚本中if-else-if语句的语法是什么?以下语法错误失败:Sahi处理嵌套的else-if语句吗?

function caseSwitch($htype){ 
    if($htype==22){ 
     type22(); 
    } 
    else{ 
     if($htype==5){ 
      type5(); 
     } //I have tried adding a semicolon here and it still fails 
    } 
    else 
    { 
     _log("Whoops, Hierarchy Type " + $htype + " has not been automated yet"); 
    } 
} 

这是一个语法问题。该解决方案在此处的Sahi论坛上提供:

http://sahi.co.in/forums/discussion/comment/16735#Comment_16735