Example for kobiton is not working
The problem
I'm trying to run example for kobiton based on instruction https://github.com/webdriverio/webdriverio/tree/master/examples But the process ends unexpectly without error:
root@25f2b7e2f7a2:/webdriverio# export KOBITON_USERNAME=##### root@25f2b7e2f7a2:/webdriverio# export KOBITON_ACCESS_KEY=####### root@25f2b7e2f7a2:/webdriverio# node ./examples/cloudservices/webdriverio.kobiton.js [10:45:21] COMMAND POST "/wd/hub/session" [10:45:21] DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"sessionName":"Automation test session","sessionDescription":"This is an example for Automation Test on Android device","deviceOrientation":"portrait","captureScreenshots":true,"browserName":"chrome","deviceGroup":"KOBITON","_":"4 more keys: ["deviceName","platformVersion","platformName","requestOrigins"]"}}
Environment
- WebdriverIO version: master branch
- Node.js version: docker image node:latest
@acuper can you provide more logs?
The console logs I put in description that is all I get. Is there any configuration setting I can change to get more ?
try to run
client
.url('http://google.com')
.setValue('*[name="q"]','webdriverio')
.click('*[name="btnG"]')
.pause(1000)
.getTitle(function(err,title) {
console.log(title);
})
.end().catch(console.log)
and see what you get.
It looks that now we see the cause of the problem. But not sure if this is kobiton issue or wdio ?
{ Error: Couldn't connect to selenium server at end() - webdriverio.kobiton.js:29:4 details: undefined, message: 'connect ECONNREFUSED 34.233.234.136:4444', type: 'RuntimeError', seleniumStack: { status: -1, type: 'ECONNREFUSED', orgStatusMessage: 'connect ECONNREFUSED 34.233.234.136:4444', message: 'Couldn't connect to selenium server' } }
Fixed example:
var webdriverio = require('../../build/index'),
client = webdriverio.remote({
desiredCapabilities: {
sessionName: 'Automation test session',
sessionDescription: 'This is an example for Automation Test on Android device',
deviceOrientation: 'portrait',
captureScreenshots: true,
browserName: 'chrome',
deviceGroup: 'KOBITON',
deviceName: 'Galaxy Note5',
platformVersion: '6.0.1',
platformName: 'Android'
},
protocol: 'https',
port: 443,
host: 'api.kobiton.com',
user: process.env.KOBITON_USERNAME,
key: process.env.KOBITON_ACCESS_KEY,
logLevel: 'verbose'
}).init();
client
.url('http://google.com')
.setValue('*[name="q"]','webdriverio')
.click('*[name="btnG"]')
.pause(1000)
.getTitle(function(err,title) {
console.log(title);
})
.end();