Open UtsavSaha opened 6 years ago
Are you trying to do something like https://github.com/admc/wd/blob/65070da779a91d0e92e8d19fe844a01c766411e5/test/midway/attach-specs.js#L9
Can you try
Var sel_obj = yield driver.getSessionId();
Then you can access it by
driver.attach(sel_obj.sessionId); //Check the syntax please. I am writing this on my phone. You can also check out async/await functionality too
I am willing to access the session id String using the getsessionID API. However the API returns a promise object.
While performing a
console.log(driver.getSessionId())
, the appropriate value gets printed .// ex: d475f0fd-ab92-4c78-a395-b515975e6bcf
However while using the value as an argument to
driver.attach()
, the url being invoked is object promise as session id. This is primarily as the chaining methods returns the driver itself.How can the sessionId value be accessed from the promise Object?