Hello World
如何输出最经典的 Hellow World。
process main { log 'hello world'; }
简短示例
执行五遍的测试用例。
#TIMES 5 process main { jumpto '[URL]'; wait 2000; ... [statement] ... }
经典示例
测试一个页面的用户登录。
process main () { // Deepin Technology Community jumpto "https://www.deepin.org/en/"; wait 2333; // click div| click "#hs-site-navigation > div:nth-child(1)"; // click Login click "#menu-main > li:nth-child(11) > ul:nth-child(2) > li:nth-child(1) > a:nth-child(1) > span:nth-child(1)"; // Navigate to New Page wait 2000; // click deepinID click "#loginform > div:nth-child(3) > a:nth-child(1)"; // Navigate to New Page wait 2000; // click a text field click "#content > form:nth-child(2) > input:nth-child(4)"; // type in lemonceide input "#content > form:nth-child(2) > input:nth-child(4)" by "lemonceide"; // type in caonima438 input "#content > form:nth-child(2) > input:nth-child(6)" by "caonima438"; // click SIGN IN click "#content > form:nth-child(2) > input:nth-child(9)"; // Navigate to New Page wait 2000; // click Deepin ID click "#menu-main > li:nth-child(11) > ul:nth-child(2) > li:nth-child(1) > a:nth-child(1) > span:nth-child(1)"; // Navigate to New Page wait 2000; // assert element div:nth-child(4) > div:nth-child(1) > div:nth-child(1)> contains [lemonceide] assert <@"body> div:nth-child(4) > div:nth-child(1) > div:nth-child(1)"/> ~~ "lemonceide"; // click Home click "#newHeader > div:nth-child(1) > ul:nth-child(2) > li:nth-child(1) > a:nth-child(1) > span:nth-child(1)"; // Navigate to New Page wait 2000; }@"body>