I get the following object from the selenium hub and I'm dumping the result to the console to see the data structure by doing the following
browser.getCapabilities().then(function (capabilities) {
console.log(capabilities);
});
and the object being printed out it is
{ caps_:
{ applicationCacheEnabled: false,
rotatable: false,
mobileEmulationEnabled: false,
chrome: { userDataDir: '/var/folders/tc/89n0t1qs5p3fyw_n9hk1x7fc0000gn/T/.org.chromium.Chromium.97EFOo' },
takesHeapSnapshot: true,
databaseEnabled: false,
handlesAlerts: true,
hasTouchScreen: false,
version: '50.0.2661.86',
platform: 'MAC',
browserConnectionEnabled: false,
nativeEvents: true,
acceptSslCerts: true,
'webdriver.remote.sessionid': 'd94af299-7fdc-4810-a42c-37a652a2248c',
locationContextEnabled: true,
webStorageEnabled: true,
browserName: 'chrome',
takesScreenshot: true,
javascriptEnabled: true,
cssSelectorsEnabled: true } }
I can get all the properties except for the one I want which is 'webdriver.remote.sessionid'. I'm not sure how to get that since it starts with a single quote. I grab the others with
console.log(capabilities.caps_.cssSelectorsEnabled)
how can I get the session id?