0

我面临一个关于将 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]

但它不起作用。我想这样做,因为我想在执行时在不同的时间传递不同的参数。

谢谢

4

1 回答 1

1

我认为您不会将 Widget 传递给用户编写的程序。

我记得试过一次,它对我也不起作用。

将您转换wait-until-element-is-loaded为接收字符串并get-editor在其中调用。

于 2018-07-10T17:53:50.097 回答