1

在 casperJS 脚本中,我正在这样做:

casper.then(function() {
    this.test.assertExists({
        type: 'xpath',
        path: '//*[@id="wrapper"]/div[1]/div[3]/div/p/a[text()="A button"]'
    }, "Got Here");
});

casper.then(function() {
    firstUrl = this.getCurrentUrl()
});

casper.thenClick(x('//*[@id="wrapper"]/div[1]/div[3]/div/p/a[text()="A Button"]'), function() {
    console.log("Woop!");
});

如何使用 Node 中的spookyJS实现此功能?是否可以在 spookyJS 中使用 xpath 选择器?

4

0 回答 0