zombie
zombie copied to clipboard
clickLink no work
- zombie version: 5.0.5
- platform: macOS Sierra
- node version: 7.3
HTML
<!--page1 /aa-->
<a href="/aa/bb" id="test">test link</a>
test.js
test('cross page test', function(done) {
browser.visit('http://localhost:3000/aa', function(){
browser.clickLink('#test', function(){
console.log(browser.location.href);
// this should be http://localhost:3000/aa/bb, but I got http://localhost:3000/aa
})
})
})
And I check some source code:
// from zombie/index.js: 620
clickLink(selector, callback) {
const link = this.link(selector);
console.log(selector);
console.log(link);
assert(link, `No link matching '${selector}`);
return this.click(link, callback)
}
// from terminal, it shows this function invoke twice, first time is `# test http://localhost:3000/aa/bb` , but second time is `#test null`
// from
Was something wrong with my code, or this is a bug?
Thanks you all!!
same question
@maicss @avkvak I have no idea what's going on but was able to get it working again by reverting to Node v7.1.
@golmansax I am using node 7.4......
@maicss Right. I also started seeing the error when I upgraded to Node 7.4, but when I downgraded to 7.1, the error went away.