File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ async function smartuiSnapshot(driver, name, options = {}) {
77
if (!name || typeof name !== 'string') throw new Error('The `name` argument is required.');
88
if (!(await utils.isSmartUIRunning())) throw new Error('Cannot find SmartUI server.');
99

10+
// Append sessionId to options
11+
try {
12+
const sessionId = await driver.getSession().then(session => session.getId());
13+
options.sessionId = sessionId;
14+
} catch (error) {
15+
console.log("Unable to append sessionId in snapshot options")
16+
}
17+
1018
let log = utils.logger(pkgName);
1119
try {
1220
let resp = await utils.fetchDOMSerializer();

0 commit comments

Comments
 (0)