我面临一个关于将 ecl 命令作为过程输入传递的问题。
我有一个 ecl 命令:
get-editor [format "Configuration Editor - %s" $projNmae] | click
我想将此 ecl 命令作为过程中的参数输入。我正在做的是:
proc "wait-until-element-is-loaded" [val editor] {
loop [val count 0] {
try {
$editor | click
} -catch {
if [eq $count 4] {
// 30 seconds
throw-error [concat "element can not be loaded within the wait time. " $editor]
}
wait 100
recur [$count | plus 1]
}
}
}
然后调用如下过程:
wait-until-element-is-loaded | get-editor [format "Configuration Editor - %s" $projName]
或者
wait-until-element-is-loaded -editor get-editor [format "Configuration Editor - %s" $projName]
但它不起作用。我想这样做,因为我想在执行时在不同的时间传递不同的参数。
谢谢