From 78afefacb20f08957ef1408105350abb4da2e158 Mon Sep 17 00:00:00 2001 From: Pinank Solanki Date: Tue, 30 Jan 2024 12:10:23 +0530 Subject: [PATCH] Change SDK samples to commonJS --- sdk/package.json | 3 +-- sdk/sdkCloud.js | 4 ++-- sdk/sdkLocal.js | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sdk/package.json b/sdk/package.json index 31e6391..d1010dd 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,10 +1,9 @@ { "dependencies": { - "@lambdatest/selenium-driver": "^1.0.1", + "@lambdatest/selenium-driver": "^1.0.2", "@lambdatest/smartui-cli": "^2.0.3", "selenium-webdriver": "^4.16.0" }, - "type": "module", "name": "sdk", "version": "1.0.0", "description": "", diff --git a/sdk/sdkCloud.js b/sdk/sdkCloud.js index 0a058e4..fca5502 100644 --- a/sdk/sdkCloud.js +++ b/sdk/sdkCloud.js @@ -1,5 +1,5 @@ -import { Builder, By, Key, until } from "selenium-webdriver"; -import { smartuiSnapshot } from "@lambdatest/selenium-driver"; +const { Builder, By, Key, until } = require('selenium-webdriver'); +const { smartuiSnapshot } = require('@lambdatest/selenium-driver'); // username: Username can be found at automation dashboard const USERNAME = process.env.LT_USERNAME || ""; diff --git a/sdk/sdkLocal.js b/sdk/sdkLocal.js index 0c683ad..23f23df 100644 --- a/sdk/sdkLocal.js +++ b/sdk/sdkLocal.js @@ -1,5 +1,5 @@ -import { Builder, By, Key, until } from "selenium-webdriver"; -import { smartuiSnapshot } from "@lambdatest/selenium-driver"; +const { Builder, By, Key, until } = require('selenium-webdriver'); +const { smartuiSnapshot } = require('@lambdatest/selenium-driver'); (async function example() { let driver = await new Builder().forBrowser("chrome").build();