diff --git a/packages/cypress/package.json b/packages/cypress/package.json index aa5359f..2e1428f 100644 --- a/packages/cypress/package.json +++ b/packages/cypress/package.json @@ -1,6 +1,6 @@ { "name": "@lambdatest/cypress-driver", - "version": "1.0.7", + "version": "1.0.8", "description": "Cypress driver for all Lambdatest functionalities", "main": "index.js", "types": "types/index.d.ts", diff --git a/packages/cypress/src/smartui.js b/packages/cypress/src/smartui.js index c918fd0..d3a15ff 100644 --- a/packages/cypress/src/smartui.js +++ b/packages/cypress/src/smartui.js @@ -14,12 +14,11 @@ function smartuiSnapshot(name, options = {}) { snapshot: name, }); } - - if (!(await client.isSmartUIRunning())) { - throw new Error('Cannot find SmartUI server.'); - } - let resp = await client.fetchDOMSerializer(); + let resp = await client.isSmartUIRunning() + if (!resp.body.cliVersion) throw new Error(`cannot find SmartUI server; ${JSON.stringify(resp)}`); + + resp = await client.fetchDOMSerializer(); eval(resp.body.data.dom); return cy.document({ log: false }).then({ timeout: CY_TIMEOUT }, dom => {