当它在 Chrome 中运行时,我得到FOUND: [object Object]
了文本断言。
当它在 PhantomJS 中运行时,我得到FOUND:
(空白)。
Running tests
Running Browser: PhantomJS
OS: mac 10.10 (Yosemite) 32bit
Browser Version: 1.9.8
RUNNING TEST - "Amazon does its thing"
▶ OPEN http://www.amazon.com/
▶ TYPE #twotabsearchtextbox
▶ CLICK .nav-submit-input
▶ WAITFORELEMENT
✘ TEXT
0 EXPECTED: The Blues Brothers
0 FOUND:
✘ TEST - "Amazon does its thing" FAILED
0/1 assertions passed. Elapsed Time: 58.91 sec
我的测试:
module.exports = {
'Amazon does its thing': function (test) {
test
.open('http://www.amazon.com/')
.type('#twotabsearchtextbox', 'Blues Brothers VHS')
.click('.nav-submit-input')
.waitForElement('#result_0')
.assert.text('#result_0 .newaps a span').is('The Blues Brothers')
.done();
}
};
我正在使用 OS X Yosemite 10.10.5。
Chrome 版本:46.0.2490.71(64 位)
达莱克版本:
DalekJS CLI 工具版本:0.0.5 DalekJS 本地安装:0.0.9