These are chat archives for Codeception/CodeceptJS

May 2016
Rémi Benoit
May 13 2016 15:13
Hi all
Is it possible to output values to the console when running tests?
Adrian Lynch
May 13 2016 15:18
Try console.log()
Rémi Benoit
May 13 2016 15:22
Ty, I was confused for a minute ><
Is there any way to get more info about WebdriverIO errors ?
using --full-trace I get :
 > WebDriverIO._failed
but that's not very informative :)
Adrian Lynch
May 13 2016 15:31
Do you have access to Selenium's output? That should have more info on failures.
Rémi Benoit
May 13 2016 15:32
I have, it does give a better view on what is getting executed
but still no info on the error itself
I'm trying to create a function using webdriverio
in a helper
  switchLastOpenedTab() {
    let client = this.helpers['WebDriverIO'].browser;


    return client.getCurrentTabId(function(tab) {

but it never get's to the second console.log
and I can see the get current in Selenium output
 • I switch last opened tab 
17:32:12.911 INFO - Executing: [get current window handle])
17:32:13.894 INFO - Done: [get current window handle]
17:32:13.902 INFO - Executing: [take screenshot])
17:32:15.024 INFO - Done: [take screenshot]
any idea what could be wrong
Rémi Benoit
May 13 2016 15:46
Actually even the example from gives me an error
if only I knew which ><
Adrian Lynch
May 13 2016 15:50

Update your: console.log("begin");
To: console.log(“begin”, client);
Or: console.log(“begin”, Object.keys(client));

Is getCurrentTabId listed?

Rémi Benoit
May 13 2016 16:12
begin { state: 'fulfilled',
   { sessionId: '5e1afb6e-4e32-460c-86c7-c78dd067877b',
     status: 0,
     state: null,
      { platform: 'LINUX',
        javascriptEnabled: true,
        acceptSslCerts: true,
        browserName: 'firefox',
        rotatable: false,
        locationContextEnabled: true,
        'webdriver.remote.sessionid': '5e1afb6e-4e32-460c-86c7-c78dd067877b',
        version: '45.1.0',
        databaseEnabled: true,
        cssSelectorsEnabled: true,
        handlesAlerts: true,
        webStorageEnabled: true,
        nativeEvents: false,
        applicationCacheEnabled: true,
        takesScreenshot: true },
     class: 'org.openqa.selenium.remote.Response',
     hCode: 1549895645 } }
2 [ 'defer',
  'isExecuted' ]
this are the 2 console output you gave me
doesn't seem to be there, I got getCurrentTabId from there
anyway even the example from doesn't work there
maybe smthg new in webdriverio
anyhow gotta run, I'll test this more at home