zombie icon indicating copy to clipboard operation
zombie copied to clipboard

clickLink no work

Open maicss opened this issue 8 years ago • 4 comments

  • 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!!

maicss avatar Jan 16 '17 03:01 maicss

same question

avkvak avatar Jan 16 '17 18:01 avkvak

@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 avatar Feb 02 '17 20:02 golmansax

@golmansax I am using node 7.4......

maicss avatar Feb 03 '17 02:02 maicss

@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.

golmansax avatar Feb 03 '17 03:02 golmansax