import odoo.tests @odoo.tests.common.at_install(False) @odoo.tests.common.post_install(True) class TestUi(odoo.tests.HttpCase): def test_01_mail_base(self): # wait till page loaded code = """ setTimeout(function () { console.log('ok'); }, 1000); """ link = '/web#action=%s' % self.ref('mail.mail_channel_action_client_chat') self.phantom_js(link, code, "odoo.__DEBUG__.services['mail_base.base']", login="admin")