[+] multitag "?[9]"
[ ] "$91"
[+] PushButton Dec
[+] multitag "-"
[ ] "$93"
[+] PushButton Plus
[+] multitag "+"
[ ] "$92"
[+] PushButton Equal
[+] multitag "="
[ ] "$112"
这样,我们在脚本里面就可以用“计算器.Plus ”来表示加号按钮,而不是晦涩的“计算器.PushButton26” 了。
除此以外,我们还需要将
[+] TextField TextField1
[ ] tag "$403"
改成
[+] TextField CalResult
[ ] tag "$403"
然后,我们新建一个WriteScript.t, 里面写如下的代码:
[-] testcase Cal123Plus() //1
[ ] 计算器.SetActive () //2
[ ] 计算器.C.Click () //3
[ ] 计算器.N1.Click () //4
[ ] 计算器.N2.Click () //5
文章来源于领测软件测试网 https://www.ltesting.net/