How to use thenClick() with spookyJS

210 views Asked by At

In a casperJS script I am doing this:

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!");
});

How can I implement this functionality with spookyJS from Node? Is it possible to use xpath selectors in spookyJS?

0

There are 0 answers