16b675df | casper = require('casper').create() casper.login = -> @fill('form[action="/sessions"]', { jid: 'testovaci1@jabbim.cz' password: 'heslo' }, true) casper.echo 'Loading roster. This may take some time.' casper.waitFor(-> #test casper.evaluate(-> __utils__.findAll('#js-inactive-friends ul li').length >= 2 ) , -> # on success casper.echo('loaded roster') , -> # on timeout casper.die('roster not loaded', 1) ) casper.inactiveListLength = -> |
bd308017 | casper.evaluate(-> __utils__.findAll('#js-inactive-friends ul li.user').length) |
16b675df | casper.activeListLength = -> |
bd308017 | casper.evaluate(-> __utils__.findAll('#js-active-friends ul li.user').length) |
16b675df | casper.tabsLength = -> |
d5ab0abf | casper.evaluate(-> __utils__.findAll('#js-tabbar .tab').length) |
16b675df | exports.Fantomas = casper |