0

我有一个项目可以转换Silk Test为其他一些 GUI 测试框架。我无法理解 Silk Test 脚本是如何组织[-][+]签名的。有人帮我理解意思吗?这是一个示例脚本

        [+] if(AssignSymbolToCatalogNumber.Exists(4))
            [ ] AssignSymbolToCatalogNumber.setActive()
            [ ] Sleep(1)
            [ ] AssignSymbolToCatalogNumber.notMapToCatalog.SetFocus()
            [ ] AssignSymbolToCatalogNumber.notMapToCatalog.Click()
        [ ] WaitForDialogExists (Keep)
        [-] if !Keep1.Exists (1)
            [ ] ResLog.LogFail ("The number {i} Keep dialog did not pop up!")
            [ ] goto EndProgram
        [-] else
            [ ] Keep1.SetActive ()
            [ ] Keep1.RadioList1RL.Select ("#1")
            [ ] Keep1.ShowEditDialogAfterEachCK.Check ()
            [ ] Keep1.OK.Click ()
        [ ] 
        [ ] WaitForDialogExists (InsertEditChildComponent)
        [-] if !InsertEditChildComponent.Exists (1)
            [ ] ResLog.LogFail ("Insert/Edit child component dialog did not pop up!")
            [ ] goto EndProgram
        [-] else
            [ ] InsertEditChildComponent.SetActive ()
            [ ] InsertEditChildComponent.ParentSiblingPB.Click ()
        [ ] 
        [ ] Sleep (1)
4

1 回答 1

1

在 Silk Test 的 4Test 语言中,块由缩进中的附加 - 字符表示tab,类似于 Python。

[+]和标签是代码编辑器开始新块的[-]指示,并且还编码该块的折叠状态。这意味着当您在 IDE 中折叠该块时,它将变为[-],如果您再次打开它,它将变为[+].

出于运行脚本的目的,它们没有任何区别,它仅与显示代码有关。

于 2016-03-21T11:34:42.480 回答