diff --git a/docs/espresso-visual-regression.md b/docs/espresso-visual-regression.md index 1f8f980f1..1673f0f6a 100644 --- a/docs/espresso-visual-regression.md +++ b/docs/espresso-visual-regression.md @@ -471,7 +471,7 @@ By leveraging machine learning algorithms, it accurately detects and crops the s 1. Verify `visual: true` is set in API request: ```json { - visual": true, + "visual": true, "smartUI.project": "ProjectName" } ``` @@ -540,8 +540,8 @@ By leveraging machine learning algorithms, it accurately detects and crops the s 3. Increase `queueTimeout` and `IdleTimeout`: ```json { - queueTimeout: 600, - IdleTimeout: 60 + "queueTimeout": 600, + "IdleTimeout": 60 } ``` diff --git a/docs/selenium-visual-regression.md b/docs/selenium-visual-regression.md index d98dd1e94..6d3595b10 100644 --- a/docs/selenium-visual-regression.md +++ b/docs/selenium-visual-regression.md @@ -147,7 +147,7 @@ options.set_capability('LT:Options', lt_options); #Connecting to the Lambdatest Selenium Cloud Grid with SmartUI self.driver = webdriver.Remote( -command_executor= "https://" +"" +":" +"" + `hub.lambdatest.com/wd/hub`.format(username, access_key),options=options) +command_executor="https://" + "" + ":" + "" + "@hub.lambdatest.com/wd/hub", options=options) ``` @@ -172,7 +172,7 @@ options.set_capability('LT:Options', lt_options); #Connecting to the Lambdatest Selenium Cloud Grid with SmartUI self.driver = webdriver.Remote( -command_executor= "https://" +"" +":" +"" + `hub.lambdatest.com/wd/hub`.format(username, access_key),options=options) +command_executor="https://" + "" + ":" + "" + "@hub.lambdatest.com/wd/hub", options=options) ``` @@ -438,8 +438,9 @@ Add the following **Webhook** to your test cases where you need to capture the s ```javascript let config = { screenshotName: '', - elementType: 'xpath'/'css_selector'/'id'/'class', //Choose one from the following options - xpath, css_selector, id or class - element: '' //Add your required element here + elementType: 'xpath', //Choose one of: xpath, css_selector, id, class + element: '' +}; await driver.executeScript("smartui.takeScreenshot", config); ``` diff --git a/docs/smartui-appium-hooks.md b/docs/smartui-appium-hooks.md index ae569642c..7b3e092c1 100644 --- a/docs/smartui-appium-hooks.md +++ b/docs/smartui-appium-hooks.md @@ -469,6 +469,10 @@ config = { 'pageCount': 15 # Enter the number of pages for the Full Page screenshot (Minimum 1, Maximum 20) } driver.execute("smartui.takeScreenshot", config) +``` + + + ```ruby diff --git a/docs/smartui-appium-java-sdk.md b/docs/smartui-appium-java-sdk.md index 1bbbed7f3..0bedade1a 100644 --- a/docs/smartui-appium-java-sdk.md +++ b/docs/smartui-appium-java-sdk.md @@ -324,7 +324,7 @@ After test execution, visit your SmartUI project dashboard to: **Example:** ```java -SmartUISnapshot.smartuiSnapshot(driver, HomeScreen-Header"); +SmartUISnapshot.smartuiSnapshot(driver, "HomeScreen-Header"); SmartUISnapshot.smartuiSnapshot(driver, "CheckoutScreen-PaymentForm"); ``` @@ -340,7 +340,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "CheckoutScreen-PaymentForm"); **Example:** ```java WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10)); -wait.until(ExpectedConditions.presenceOfElementLocated(By.id(main-content"))); +wait.until(ExpectedConditions.presenceOfElementLocated(By.id("main-content"))); SmartUISnapshot.smartuiSnapshot(driver, "Screen Loaded"); ``` @@ -443,7 +443,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screen Loaded"); 1. Add explicit waits before screenshots: ```java WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10)); - wait.until(ExpectedConditions.presenceOfElementLocated(By.id(content"))); + wait.until(ExpectedConditions.presenceOfElementLocated(By.id("content"))); ``` 2. Wait for specific elements to be visible: @@ -472,8 +472,8 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screen Loaded"); 2. Ensure elements exist at screenshot time 3. Check JSON formatting in configuration: ```java - Map ignoreBoxes = new HashMap<">(); - ignoreBoxes.put(xpath", new String[]{"//*[@text="'Dynamic" Ad']"}); + Map ignoreBoxes = new HashMap<>(); + ignoreBoxes.put("xpath", new String[]{"//*[@text='Dynamic Ad']"}); ``` 4. Test XPath locators in isolation before using in config diff --git a/docs/smartui-approval-workflow-guide.md b/docs/smartui-approval-workflow-guide.md index 7b3131659..3aa7af923 100644 --- a/docs/smartui-approval-workflow-guide.md +++ b/docs/smartui-approval-workflow-guide.md @@ -272,7 +272,7 @@ npx smartui exec -- npm test ``` ### For SDK Integration -```javascript +```java // Set capability explicitly for baseline marking DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("smartUI.baseline", true); diff --git a/docs/smartui-cli-env-variables.md b/docs/smartui-cli-env-variables.md index 1cdc55be2..0774fe74e 100644 --- a/docs/smartui-cli-env-variables.md +++ b/docs/smartui-cli-env-variables.md @@ -192,6 +192,9 @@ In case you are accessing your network using corporate proxies, set the proxies ```bash export HTTP_PROXY="http://:@:/" +``` + + ```bash diff --git a/docs/smartui-cypress-sdk.md b/docs/smartui-cypress-sdk.md index 6f1e6b005..9741d352a 100644 --- a/docs/smartui-cypress-sdk.md +++ b/docs/smartui-cypress-sdk.md @@ -258,50 +258,50 @@ When conducting visual tests, you may encounter scenarios where certain elements -```js title="This is a sample for your configuration for Cypress to ignore by" ID" +```js title="This is a sample for your configuration for Cypress to ignore by ID" let options = { ignoreDOM: { id: ["ID-1", "ID-2"], } } -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` -```js title="This is a sample for your configuration for Cypress to ignore by" Class" +```js title="This is a sample for your configuration for Cypress to ignore by Class" let options = { ignoreDOM: { class: ["Class-1", "Class-2"], } } -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` -```js title="This is a sample for your configuration for Cypress to ignore by" XPath" +```js title="This is a sample for your configuration for Cypress to ignore by XPath" let options = { ignoreDOM: { xpath: ["Xpath-1", "Xpath-2"], } } -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` -```js title="This is a sample for your configuration for Cypress to ignore by CSS" Selector" +```js title="This is a sample for your configuration for Cypress to ignore by CSS Selector" let options = { ignoreDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], } } -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` @@ -316,44 +316,44 @@ let options = { id: ["ID-1", "ID-2"], } } -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` -```js title="This is a sample for your configuration for Cypress to select by" Class" +```js title="This is a sample for your configuration for Cypress to select by Class" let options = { selectDOM: { class: ["Class-1", "Class-2"], } } -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` -```js title="This is a sample for your configuration for Cypress to select by" XPath" +```js title="This is a sample for your configuration for Cypress to select by XPath" let options = { selectDOM: { xpath: ["Xpath-1", "Xpath-2"], } } -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` -```js title="This is a sample for your webhook configuration for Cypress to select by CSS" Selector" +```js title="This is a sample for your webhook configuration for Cypress to select by CSS Selector" let options = { selectDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], } } -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` @@ -372,31 +372,31 @@ let options = { id: 'Required ID', } }; -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` -```js title="This is a sample for your configuration for Cypress to capture an element by" Class" +```js title="This is a sample for your configuration for Cypress to capture an element by Class" let options = { element: { class: 'Required Class', } }; -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` -```js title="This is a sample for your configuration for Cypress to capture an element by" XPath" +```js title="This is a sample for your configuration for Cypress to capture an element by XPath" let options = { element: { xpath: 'Required Xpath', } }; -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` @@ -404,13 +404,13 @@ cy.smartuiSnapshot(‘Screenshot Name’, options); -```js title="This is a sample for your webhook configuration for Cypress to capture an element by CSS" Selector" +```js title="This is a sample for your webhook configuration for Cypress to capture an element by CSS Selector" let options = { element: { cssSelector: 'Required CSS Selector', } }; -cy.smartuiSnapshot(‘Screenshot Name’, options); +cy.smartuiSnapshot('Screenshot Name', options); ``` @@ -560,7 +560,7 @@ cy.smartuiSnapshot('Page Loaded'); 2. Enable JavaScript in configuration: ```json { - enableJavaScript": true + "enableJavaScript": true } ``` diff --git a/docs/smartui-pdf-java-sdk.md b/docs/smartui-pdf-java-sdk.md index 08a797b9c..2b8336807 100644 --- a/docs/smartui-pdf-java-sdk.md +++ b/docs/smartui-pdf-java-sdk.md @@ -150,7 +150,7 @@ Upload pre-existing PDFs from your local machine: public class SmartuiPdfLocalTest { public void uploadLocalPdf() throws Exception { - String projectToken = System.getenv(PROJECT_TOKEN"); + String projectToken = System.getenv("PROJECT_TOKEN"); SmartUIConfig config = new SmartUIConfig() .withProjectToken(projectToken) @@ -179,7 +179,7 @@ Upload PDFs downloaded during cloud test execution: public class SmartuiPdfCloudTest { public void uploadCloudPdf(WebDriver driver) throws Exception { - String projectToken = System.getenv(PROJECT_TOKEN"); + String projectToken = System.getenv("PROJECT_TOKEN"); // Download PDF from cloud session String base64Content = (String) ((JavaScriptExecutor) driver) @@ -300,7 +300,7 @@ public class SmartuiPdfErrorHandling { **Example:** ```java String[] pdfPaths = { - documents/reports/report-v1.0.pdf", + "documents/reports/report-v1.0.pdf", "documents/specs/spec-v2.1.pdf" }; ``` @@ -326,7 +326,7 @@ String[] pdfPaths = { **Example:** ```java -config.withBuildName(PDF-Comparison-v1.0-" + LocalDate.now()); +config.withBuildName("PDF-Comparison-v1.0-" + LocalDate.now()); ``` @@ -386,7 +386,7 @@ config.withBuildName(PDF-Comparison-v1.0-" + LocalDate.now()); 2. Check file path is correct: ```java - File pdfFile = new File(path/to/document.pdf"); + File pdfFile = new File("path/to/document.pdf"); if (!pdfFile.exists()) { throw new FileNotFoundException("PDF file not found"); } @@ -489,7 +489,7 @@ config.withBuildName(PDF-Comparison-v1.0-" + LocalDate.now()); for (String pdfPath : pdfPaths) { try { FormattedResults result = pdfUploader.uploadPDF(pdfPath); - System.out.println(Uploaded: " + pdfPath); + System.out.println("Uploaded: " + pdfPath); } catch (Exception e) { System.err.println("Failed: " + pdfPath + " - " + e.getMessage()); } diff --git a/docs/smartui-playwright-java-sdk.md b/docs/smartui-playwright-java-sdk.md index e5c5bbb29..fdcd02bb0 100644 --- a/docs/smartui-playwright-java-sdk.md +++ b/docs/smartui-playwright-java-sdk.md @@ -223,7 +223,7 @@ When conducting visual tests, you may encounter scenarios where certain elements -```java title="This is a sample for your configuration for Java to ignore by" ID" +```java title="This is a sample for your configuration for Java to ignore by ID" List cssID = Arrays.asList(""); Map options = new HashMap<>(); Map> ignore = new HashMap<>(); @@ -237,7 +237,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to ignore by" Class" +```java title="This is a sample for your configuration for Java to ignore by Class" List cssclass = Arrays.asList(""); Map options = new HashMap<>(); Map> ignore = new HashMap<>(); @@ -251,7 +251,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to ignore by" XPath" +```java title="This is a sample for your configuration for Java to ignore by XPath" List path = Arrays.asList(""); Map options = new HashMap<>(); Map> ignore = new HashMap<>(); @@ -266,7 +266,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to ignore by CSS" Selector" +```java title="This is a sample for your configuration for Java to ignore by CSS Selector" List selector = Arrays.asList(""); Map options = new HashMap<>(); Map> ignore = new HashMap<>(); @@ -297,7 +297,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to select by" Class" +```java title="This is a sample for your configuration for Java to select by Class" List cssclass = Arrays.asList(""); Map options = new HashMap<>(); Map> select = new HashMap<>(); @@ -311,7 +311,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to select by" XPath" +```java title="This is a sample for your configuration for Java to select by XPath" List path = Arrays.asList(""); Map options = new HashMap<>(); Map> select = new HashMap<>(); @@ -326,7 +326,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your webhook configuration for Java to select by CSS" Selector" +```java title="This is a sample for your webhook configuration for Java to select by CSS Selector" List selector = Arrays.asList(""); Map options = new HashMap<>(); Map> select = new HashMap<>(); @@ -359,7 +359,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to capture an element by" Class" +```java title="This is a sample for your configuration for Java to capture an element by Class" HashMap options = new HashMap<>(); HashMap locator = new HashMap<>(); options.put("element", locator); @@ -371,7 +371,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to capture an element by" XPath" +```java title="This is a sample for your configuration for Java to capture an element by XPath" HashMap options = new HashMap<>(); HashMap locator = new HashMap<>(); options.put("element", locator); @@ -384,7 +384,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to capture an element by CSS" Selector" +```java title="This is a sample for your configuration for Java to capture an element by CSS Selector" HashMap options = new HashMap<>(); HashMap locator = new HashMap<>(); options.put("element", locator); @@ -453,7 +453,7 @@ public void tearDown() { **Example:** ```java -SmartUISnapshot.smartuiSnapshot(driver, HomePage-Header"); +SmartUISnapshot.smartuiSnapshot(driver, "HomePage-Header"); SmartUISnapshot.smartuiSnapshot(driver, "ProductPage-MainContent"); ``` @@ -468,7 +468,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "ProductPage-MainContent"); **Example:** ```java -page.navigate(https://example.com"); +page.navigate("https://example.com"); page.waitForSelector("#main-content", new Page.WaitForSelectorOptions().setState(WaitForSelectorState.VISIBLE)); SmartUISnapshot.smartuiSnapshot(driver, "Page Loaded"); ``` diff --git a/docs/smartui-playwright-python-sdk.md b/docs/smartui-playwright-python-sdk.md index 0d7c90625..cf6185c19 100644 --- a/docs/smartui-playwright-python-sdk.md +++ b/docs/smartui-playwright-python-sdk.md @@ -203,7 +203,7 @@ Once, the configuration file will be created, you will be seeing the default con - You can incorporate SmartUI into your custom `Playwright` automation test (any platform) script by adding the `smartuiSnapshot` function in the required segment of playwright script of which we would like to take the screenshot, as shown below: ```python -ffrom playwright.sync_api import sync_playwright, Playwright +from playwright.sync_api import sync_playwright, Playwright from lambdatest_playwright_driver import smartui_snapshot def run(playwright: Playwright): @@ -265,10 +265,10 @@ When conducting visual tests, you may encounter scenarios where certain elements -```rb title="This is a sample for your configuration for Python to ignore by ID" +```python title="This is a sample for your configuration for Python to ignore by ID" options = { - ignoreDOM: { - id: ["ID-1", "ID-2"], + "ignoreDOM": { + "id": ["ID-1", "ID-2"], } } page.goto("Required URL") @@ -278,12 +278,12 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your configuration for Python to ignore by Class" +```python title="This is a sample for your configuration for Python to ignore by Class" options = { - ignoreDOM: { - class: ["Class-1", "Class-2"], - } - } + "ignoreDOM": { + "class": ["Class-1", "Class-2"], + } +} page.goto("Required URL") smartui_snapshot(page,"", options) ``` @@ -291,10 +291,10 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your configuration for Python to ignore by XPath" +```python title="This is a sample for your configuration for Python to ignore by XPath" options = { - ignoreDOM: { - xpath: ["Xpath-1", "Xpath-2"], + "ignoreDOM": { + "xpath": ["Xpath-1", "Xpath-2"], } } page.goto("Required URL") @@ -305,10 +305,10 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your configuration for Python to ignore by CSS Selector" +```python title="This is a sample for your configuration for Python to ignore by CSS Selector" options = { - ignoreDOM: { - cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], + "ignoreDOM": { + "cssSelector": ["CSS-Selector-1", "CSS-Selector-2"], } } page.goto("Required URL") @@ -321,10 +321,10 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your configuration for Python to select by ID." +```python title="This is a sample for your configuration for Python to select by ID." options = { - selectDOM: { - id: ["ID-1", "ID-2"], + "selectDOM": { + "id": ["ID-1", "ID-2"], } } page.goto("Required URL") @@ -334,12 +334,12 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your configuration for Python to select by Class" +```python title="This is a sample for your configuration for Python to select by Class" options = { - selectDOM: { - class: ["Class-1", "Class-2"], - } - } + "selectDOM": { + "class": ["Class-1", "Class-2"], + } +} page.goto("Required URL") smartui_snapshot(page,"", options) ``` @@ -347,10 +347,10 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your configuration for Python to select by XPath" +```python title="This is a sample for your configuration for Python to select by XPath" options = { - selectDOM: { - xpath: ["Xpath-1", "Xpath-2"], + "selectDOM": { + "xpath": ["Xpath-1", "Xpath-2"], } } page.goto("Required URL") @@ -361,10 +361,10 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your webhook configuration for Python to select by CSS Selector" +```python title="This is a sample for your webhook configuration for Python to select by CSS Selector" options = { - selectDOM: { - cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], + "selectDOM": { + "cssSelector": ["CSS-Selector-1", "CSS-Selector-2"], } } page.goto("Required URL") @@ -381,10 +381,10 @@ You can capture screenshots of targeted elements by leveraging various locator m -```py title="This is a sample for your configuration for Python to capture an element by ID." +```python title="This is a sample for your configuration for Python to capture an element by ID." options = { - element: { - id: 'Required ID', + "element": { + "id": "Required ID", } } page.goto("Required URL") @@ -394,12 +394,12 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your configuration for Python to capture an element by Class" +```python title="This is a sample for your configuration for Python to capture an element by Class" options = { - element: { - class: 'Required Class', - } - } + "element": { + "class": "Required Class", + } +} page.goto("Required URL") smartui_snapshot(page,"", options) ``` @@ -407,10 +407,10 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your configuration for Python to capture an element by XPath" +```python title="This is a sample for your configuration for Python to capture an element by XPath" options = { - element: { - xpath: 'Required Xpath', + "element": { + "xpath": "Required Xpath", } } page.goto("Required URL") @@ -421,10 +421,10 @@ smartui_snapshot(page,"", options) -```py title="This is a sample for your webhook configuration for Python to capture an element by CSS Selector" +```python title="This is a sample for your webhook configuration for Python to capture an element by CSS Selector" options = { - element: { - cssSelector: 'Required CSS Selector', + "element": { + "cssSelector": "Required CSS Selector", } } page.goto("Required URL") diff --git a/docs/smartui-playwright-sdk.md b/docs/smartui-playwright-sdk.md index 19f30297d..00f55a604 100644 --- a/docs/smartui-playwright-sdk.md +++ b/docs/smartui-playwright-sdk.md @@ -243,7 +243,7 @@ When conducting visual tests, you may encounter scenarios where certain elements -```js title="This is a sample for your configuration for Playwright to ignore by" ID" +```js title="This is a sample for your configuration for Playwright to ignore by ID" let options = { ignoreDOM: { id: ["ID-1", "ID-2"], @@ -256,7 +256,7 @@ let options = { -```js title="This is a sample for your configuration for Playwright to ignore by" Class" +```js title="This is a sample for your configuration for Playwright to ignore by Class" let options = { ignoreDOM: { class: ["Class-1", "Class-2"], @@ -269,7 +269,7 @@ let options = { -```js title="This is a sample for your configuration for Playwright to ignore by" XPath" +```js title="This is a sample for your configuration for Playwright to ignore by XPath" let options = { ignoreDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -283,7 +283,7 @@ let options = { -```js title="This is a sample for your configuration for Playwright to ignore by CSS" Selector" +```js title="This is a sample for your configuration for Playwright to ignore by CSS Selector" let options = { ignoreDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -312,7 +312,7 @@ let options = { -```js title="This is a sample for your configuration for Playwright to select by" Class" +```js title="This is a sample for your configuration for Playwright to select by Class" let options = { selectDOM: { class: ["Class-1", "Class-2"], @@ -325,7 +325,7 @@ let options = { -```js title="This is a sample for your configuration for Playwright to select by" XPath" +```js title="This is a sample for your configuration for Playwright to select by XPath" let options = { selectDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -339,7 +339,7 @@ let options = { -```js title="This is a sample for your webhook configuration for Playwright to select by CSS" Selector" +```js title="This is a sample for your webhook configuration for Playwright to select by CSS Selector" let options = { selectDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -372,7 +372,7 @@ let options = { -```js title="This is a sample for your configuration for Playwright to capture an element by" Class" +```js title="This is a sample for your configuration for Playwright to capture an element by Class" let options = { element: { class: 'Required Class', @@ -385,7 +385,7 @@ let options = { -```js title="This is a sample for your configuration for Playwright to capture an element by" XPath" +```js title="This is a sample for your configuration for Playwright to capture an element by XPath" let options = { element: { xpath: 'Required Xpath', @@ -399,7 +399,7 @@ let options = { -```js title="This is a sample for your webhook configuration for Playwright to capture an element by CSS" Selector" +```js title="This is a sample for your webhook configuration for Playwright to capture an element by CSS Selector" let options = { element: { cssSelector: 'Required CSS Selector', @@ -478,7 +478,7 @@ const smartuiSnapshot = require('@lambdatest/playwright-driver'); **Example:** ```javascript -await smartuiSnapshot.smartuiSnapshot(page, HomePage-Header"); +await smartuiSnapshot.smartuiSnapshot(page, "HomePage-Header"); await smartuiSnapshot.smartuiSnapshot(page, "ProductPage-MainContent"); ``` @@ -496,7 +496,7 @@ await smartuiSnapshot.smartuiSnapshot(page, "ProductPage-MainContent"); ```javascript await page.goto('https://example.com'); await page.waitForSelector('#main-content', { state: 'visible' }); -await smartuiSnapshot.smartuiSnapshot(page, Page Loaded"); +await smartuiSnapshot.smartuiSnapshot(page, "Page Loaded"); ``` @@ -605,7 +605,7 @@ await smartuiSnapshot.smartuiSnapshot(page, Page Loaded"); 2. Enable JavaScript in configuration: ```json { - enableJavaScript": true + "enableJavaScript": true } ``` diff --git a/docs/smartui-puppeteer-sdk.md b/docs/smartui-puppeteer-sdk.md index fd64bcab2..44fd42de3 100644 --- a/docs/smartui-puppeteer-sdk.md +++ b/docs/smartui-puppeteer-sdk.md @@ -245,7 +245,7 @@ When conducting visual tests, you may encounter scenarios where certain elements -```js title="This is a sample for your configuration for Puppeteer to ignore by" ID" +```js title="This is a sample for your configuration for Puppeteer to ignore by ID" let options = { ignoreDOM: { id: ["ID-1", "ID-2"], @@ -258,7 +258,7 @@ let options = { -```js title="This is a sample for your configuration for Puppeteer to ignore by" Class" +```js title="This is a sample for your configuration for Puppeteer to ignore by Class" let options = { ignoreDOM: { class: ["Class-1", "Class-2"], @@ -271,7 +271,7 @@ let options = { -```js title="This is a sample for your configuration for Puppeteer to ignore by" XPath" +```js title="This is a sample for your configuration for Puppeteer to ignore by XPath" let options = { ignoreDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -285,7 +285,7 @@ let options = { -```js title="This is a sample for your configuration for Puppeteer to ignore by CSS" Selector" +```js title="This is a sample for your configuration for Puppeteer to ignore by CSS Selector" let options = { ignoreDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -314,7 +314,7 @@ let options = { -```js title="This is a sample for your configuration for Puppeteer to select by" Class" +```js title="This is a sample for your configuration for Puppeteer to select by Class" let options = { selectDOM: { class: ["Class-1", "Class-2"], @@ -327,7 +327,7 @@ let options = { -```js title="This is a sample for your configuration for Puppeteer to select by" XPath" +```js title="This is a sample for your configuration for Puppeteer to select by XPath" let options = { selectDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -341,7 +341,7 @@ let options = { -```js title="This is a sample for your webhook configuration for Puppeteer to select by CSS" Selector" +```js title="This is a sample for your webhook configuration for Puppeteer to select by CSS Selector" let options = { selectDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -374,7 +374,7 @@ let options = { -```js title="This is a sample for your configuration for Puppeteer to capture an element by" Class" +```js title="This is a sample for your configuration for Puppeteer to capture an element by Class" let options = { element: { class: 'Required Class', @@ -387,7 +387,7 @@ let options = { -```js title="This is a sample for your configuration for Puppeteer to capture an element by" XPath" +```js title="This is a sample for your configuration for Puppeteer to capture an element by XPath" let options = { element: { xpath: 'Required Xpath', @@ -401,7 +401,7 @@ let options = { -```js title="This is a sample for your webhook configuration for Puppeteer to capture an element by CSS" Selector" +```js title="This is a sample for your webhook configuration for Puppeteer to capture an element by CSS Selector" let options = { element: { cssSelector: 'Required CSS Selector', @@ -481,7 +481,7 @@ const { smartuiSnapshot } = require('@lambdatest/puppeteer-driver'); **Example:** ```javascript -await smartuiSnapshot(page, HomePage-Header"); +await smartuiSnapshot(page, "HomePage-Header"); await smartuiSnapshot(page, "ProductPage-MainContent"); ``` @@ -500,7 +500,7 @@ await smartuiSnapshot(page, "ProductPage-MainContent"); await page.goto('https://example.com'); await page.waitForSelector('#main-content', { visible: true }); await page.waitForLoadState('networkidle'); -await smartuiSnapshot(page, Page Loaded"); +await smartuiSnapshot(page, "Page Loaded"); ``` @@ -610,7 +610,7 @@ await smartuiSnapshot(page, Page Loaded"); 2. Enable JavaScript in configuration: ```json { - enableJavaScript": true + "enableJavaScript": true } ``` diff --git a/docs/smartui-selenium-java-sdk.md b/docs/smartui-selenium-java-sdk.md index 2c2250406..e3198a525 100644 --- a/docs/smartui-selenium-java-sdk.md +++ b/docs/smartui-selenium-java-sdk.md @@ -261,7 +261,7 @@ When conducting visual tests, you may encounter scenarios where certain elements -```java title="This is a sample for your configuration for Java to ignore by" ID" +```java title="This is a sample for your configuration for Java to ignore by ID" List cssID = Arrays.asList(""); Map options = new HashMap<>(); Map> ignore = new HashMap<>(); @@ -275,7 +275,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to ignore by" Class" +```java title="This is a sample for your configuration for Java to ignore by Class" List cssclass = Arrays.asList(""); Map options = new HashMap<>(); Map> ignore = new HashMap<>(); @@ -289,7 +289,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to ignore by" XPath" +```java title="This is a sample for your configuration for Java to ignore by XPath" List path = Arrays.asList(""); Map options = new HashMap<>(); Map> ignore = new HashMap<>(); @@ -304,7 +304,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to ignore by CSS" Selector" +```java title="This is a sample for your configuration for Java to ignore by CSS Selector" List selector = Arrays.asList(""); Map options = new HashMap<>(); Map> ignore = new HashMap<>(); @@ -335,7 +335,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to select by" Class" +```java title="This is a sample for your configuration for Java to select by Class" List cssclass = Arrays.asList(""); Map options = new HashMap<>(); Map> select = new HashMap<>(); @@ -349,7 +349,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to select by" XPath" +```java title="This is a sample for your configuration for Java to select by XPath" List path = Arrays.asList(""); Map options = new HashMap<>(); Map> select = new HashMap<>(); @@ -364,7 +364,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your webhook configuration for Java to select by CSS" Selector" +```java title="This is a sample for your webhook configuration for Java to select by CSS Selector" List selector = Arrays.asList(""); Map options = new HashMap<>(); Map> select = new HashMap<>(); @@ -399,7 +399,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to capture an element by" Class" +```java title="This is a sample for your configuration for Java to capture an element by Class" HashMap options = new HashMap<>(); HashMap locator = new HashMap<>(); options.put("element", locator); @@ -411,7 +411,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to capture an element by" XPath" +```java title="This is a sample for your configuration for Java to capture an element by XPath" HashMap options = new HashMap<>(); HashMap locator = new HashMap<>(); options.put("element", locator); @@ -424,7 +424,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screenshot Name", options); -```java title="This is a sample for your configuration for Java to capture an element by CSS" Selector" +```java title="This is a sample for your configuration for Java to capture an element by CSS Selector" HashMap options = new HashMap<>(); HashMap locator = new HashMap<>(); options.put("element", locator); @@ -504,7 +504,7 @@ public void tearDown() { **Example:** ```java -SmartUISnapshot.smartuiSnapshot(driver, HomePage-Header"); +SmartUISnapshot.smartuiSnapshot(driver, "HomePage-Header"); SmartUISnapshot.smartuiSnapshot(driver, "ProductPage-MainContent"); ``` @@ -520,7 +520,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "ProductPage-MainContent"); **Example:** ```java -driver.get(https://example.com"); +driver.get("https://example.com"); WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10)); wait.until(ExpectedConditions.presenceOfElementLocated(By.id("main-content"))); SmartUISnapshot.smartuiSnapshot(driver, "Page Loaded"); @@ -626,7 +626,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Page Loaded"); 1. Add explicit waits before screenshots: ```java WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10)); - wait.until(ExpectedConditions.presenceOfElementLocated(By.id(content"))); + wait.until(ExpectedConditions.presenceOfElementLocated(By.id("content"))); ``` 2. Enable JavaScript in configuration: diff --git a/docs/smartui-selenium-js-sdk.md b/docs/smartui-selenium-js-sdk.md index 967862c81..54ddd6295 100644 --- a/docs/smartui-selenium-js-sdk.md +++ b/docs/smartui-selenium-js-sdk.md @@ -239,7 +239,7 @@ When conducting visual tests, you may encounter scenarios where certain elements -```js title="This is a sample for your configuration for JavaScript to ignore by" ID" +```js title="This is a sample for your configuration for JavaScript to ignore by ID" let options = { ignoreDOM: { id: ["ID-1", "ID-2"], @@ -252,7 +252,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to ignore by" Class" +```js title="This is a sample for your configuration for JavaScript to ignore by Class" let options = { ignoreDOM: { class: ["Class-1", "Class-2"], @@ -265,7 +265,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to ignore by" XPath" +```js title="This is a sample for your configuration for JavaScript to ignore by XPath" let options = { ignoreDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -279,7 +279,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to ignore by CSS" Selector" +```js title="This is a sample for your configuration for JavaScript to ignore by CSS Selector" let options = { ignoreDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -295,7 +295,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to select by" ID" +```js title="This is a sample for your configuration for JavaScript to select by ID" let options = { selectDOM: { id: ["ID-1", "ID-2"], @@ -308,7 +308,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to select by" Class" +```js title="This is a sample for your configuration for JavaScript to select by Class" let options = { selectDOM: { class: ["Class-1", "Class-2"], @@ -321,7 +321,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to select by" XPath" +```js title="This is a sample for your configuration for JavaScript to select by XPath" let options = { selectDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -335,7 +335,7 @@ let options = { -```js title="This is a sample for your webhook configuration for JavaScript to select by CSS" Selector" +```js title="This is a sample for your webhook configuration for JavaScript to select by CSS Selector" let options = { selectDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -368,7 +368,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to capture an element by" Class" +```js title="This is a sample for your configuration for JavaScript to capture an element by Class" let options = { element: { class: 'Required Class', @@ -381,7 +381,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to capture an element by" XPath" +```js title="This is a sample for your configuration for JavaScript to capture an element by XPath" let options = { element: { xpath: 'Required Xpath', @@ -395,7 +395,7 @@ let options = { -```js title="This is a sample for your webhook configuration for JavaScript to capture an element by CSS" Selector" +```js title="This is a sample for your webhook configuration for JavaScript to capture an element by CSS Selector" let options = { element: { cssSelector: 'Required CSS Selector', @@ -469,7 +469,7 @@ const { smartuiSnapshot } = require('@lambdatest/selenium-driver'); **Example:** ```javascript -await smartuiSnapshot(driver, HomePage-Header"); +await smartuiSnapshot(driver, "HomePage-Header"); await smartuiSnapshot(driver, "ProductPage-MainContent"); ``` @@ -488,7 +488,7 @@ await smartuiSnapshot(driver, "ProductPage-MainContent"); const { until, By } = require('selenium-webdriver'); await driver.get('https://example.com'); await driver.wait(until.elementLocated(By.id('main-content')), 10000); -await smartuiSnapshot(driver, Page Loaded"); +await smartuiSnapshot(driver, "Page Loaded"); ``` @@ -598,7 +598,7 @@ await smartuiSnapshot(driver, Page Loaded"); 2. Enable JavaScript in configuration: ```json { - enableJavaScript": true + "enableJavaScript": true } ``` diff --git a/docs/smartui-selenium-python-sdk.md b/docs/smartui-selenium-python-sdk.md index 885a37d31..817296c51 100644 --- a/docs/smartui-selenium-python-sdk.md +++ b/docs/smartui-selenium-python-sdk.md @@ -255,10 +255,10 @@ When conducting visual tests, you may encounter scenarios where certain elements -```rb title="This is a sample for your configuration for Python to ignore by ID" +```python title="This is a sample for your configuration for Python to ignore by ID" options = { - ignoreDOM: { - id: ["ID-1", "ID-2"], + "ignoreDOM": { + "id": ["ID-1", "ID-2"], } } driver.get('') @@ -268,12 +268,12 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your configuration for Python to ignore by Class" +```python title="This is a sample for your configuration for Python to ignore by Class" options = { - ignoreDOM: { - class: ["Class-1", "Class-2"], - } - } + "ignoreDOM": { + "class": ["Class-1", "Class-2"], + } +} driver.get('') smartui_snapshot(driver,"", options) ``` @@ -281,10 +281,10 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your configuration for Python to ignore by XPath" +```python title="This is a sample for your configuration for Python to ignore by XPath" options = { - ignoreDOM: { - xpath: ["Xpath-1", "Xpath-2"], + "ignoreDOM": { + "xpath": ["Xpath-1", "Xpath-2"], } } driver.get('') @@ -295,10 +295,10 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your configuration for Python to ignore by CSS Selector" +```python title="This is a sample for your configuration for Python to ignore by CSS Selector" options = { - ignoreDOM: { - cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], + "ignoreDOM": { + "cssSelector": ["CSS-Selector-1", "CSS-Selector-2"], } } driver.get('') @@ -311,10 +311,10 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your configuration for Python to select by ID." +```python title="This is a sample for your configuration for Python to select by ID." options = { - selectDOM: { - id: ["ID-1", "ID-2"], + "selectDOM": { + "id": ["ID-1", "ID-2"], } } driver.get('') @@ -324,12 +324,12 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your configuration for Python to select by Class" +```python title="This is a sample for your configuration for Python to select by Class" options = { - selectDOM: { - class: ["Class-1", "Class-2"], - } - } + "selectDOM": { + "class": ["Class-1", "Class-2"], + } +} driver.get('') smartui_snapshot(driver,"", options) ``` @@ -337,10 +337,10 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your configuration for Python to select by XPath" +```python title="This is a sample for your configuration for Python to select by XPath" options = { - selectDOM: { - xpath: ["Xpath-1", "Xpath-2"], + "selectDOM": { + "xpath": ["Xpath-1", "Xpath-2"], } } driver.get('') @@ -351,10 +351,10 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your webhook configuration for Python to select by CSS Selector" +```python title="This is a sample for your webhook configuration for Python to select by CSS Selector" options = { - selectDOM: { - cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], + "selectDOM": { + "cssSelector": ["CSS-Selector-1", "CSS-Selector-2"], } } driver.get('') @@ -371,10 +371,10 @@ You can capture screenshots of targeted elements by leveraging various locator m -```py title="This is a sample for your configuration for Python to capture an element by ID." +```python title="This is a sample for your configuration for Python to capture an element by ID." options = { - element: { - id: 'Required ID', + "element": { + "id": "Required ID", } } driver.get('') @@ -384,12 +384,12 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your configuration for Python to capture an element by Class" +```python title="This is a sample for your configuration for Python to capture an element by Class" options = { - element: { - class: 'Required Class', - } - } + "element": { + "class": "Required Class", + } +} driver.get('') smartui_snapshot(driver,"", options) ``` @@ -397,10 +397,10 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your configuration for Python to capture an element by XPath" +```python title="This is a sample for your configuration for Python to capture an element by XPath" options = { - element: { - xpath: 'Required Xpath', + "element": { + "xpath": "Required Xpath", } } driver.get('') @@ -411,10 +411,10 @@ smartui_snapshot(driver,"", options) -```py title="This is a sample for your webhook configuration for Python to capture an element by CSS Selector" +```python title="This is a sample for your webhook configuration for Python to capture an element by CSS Selector" options = { - element: { - cssSelector: 'Required CSS Selector', + "element": { + "cssSelector": "Required CSS Selector", } } driver.get('') @@ -428,7 +428,7 @@ smartui_snapshot(driver,"", options) If you encounter difficulties loading interactive elements that appear on scroll in full-page screenshots, consider functionally incorporating a full-page scroll into your script before capturing the screenshot. This approach ensures the elements load first, facilitating the screenshot processing. -```py Example for scrolling to bottom for lazy elements +```python Example for scrolling to bottom for lazy elements from selenium import webdriver from lambdatest_selenium_driver import smartui_snapshot diff --git a/docs/smartui-selenium-ruby-sdk.md b/docs/smartui-selenium-ruby-sdk.md index d6dce6c64..cea02fc6d 100644 --- a/docs/smartui-selenium-ruby-sdk.md +++ b/docs/smartui-selenium-ruby-sdk.md @@ -238,7 +238,7 @@ When conducting visual tests, you may encounter scenarios where certain elements -```rb title="This is a sample for your configuration for Ruby to ignore by" ID" +```rb title="This is a sample for your configuration for Ruby to ignore by ID" options = { ignoreDOM: { id: ["ID-1", "ID-2"], @@ -251,7 +251,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Screenshot Name", options -```rb title="This is a sample for your configuration for Ruby to ignore by" Class" +```rb title="This is a sample for your configuration for Ruby to ignore by Class" options = { ignoreDOM: { class: ["Class-1", "Class-2"], @@ -264,7 +264,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Screenshot Name", options -```rb title="This is a sample for your configuration for Ruby to ignore by" XPath" +```rb title="This is a sample for your configuration for Ruby to ignore by XPath" options = { ignoreDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -278,7 +278,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Screenshot Name", options -```rb title="This is a sample for your configuration for Ruby to ignore by CSS" Selector" +```rb title="This is a sample for your configuration for Ruby to ignore by CSS Selector" options = { ignoreDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -307,7 +307,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Screenshot Name", options -```rb title="This is a sample for your configuration for Ruby to select by" Class" +```rb title="This is a sample for your configuration for Ruby to select by Class" options = { selectDOM: { class: ["Class-1", "Class-2"], @@ -320,7 +320,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Screenshot Name", options -```rb title="This is a sample for your configuration for Ruby to select by" XPath" +```rb title="This is a sample for your configuration for Ruby to select by XPath" options = { selectDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -334,7 +334,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Screenshot Name", options -```rb title="This is a sample for your webhook configuration for Ruby to select by CSS" Selector" +```rb title="This is a sample for your webhook configuration for Ruby to select by CSS Selector" options = { selectDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -367,7 +367,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Screenshot Name", options -```rb title="This is a sample for your configuration for Ruby to capture an element by" Class" +```rb title="This is a sample for your configuration for Ruby to capture an element by Class" options = { element: { class: 'Required Class', @@ -380,7 +380,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Screenshot Name", options -```rb title="This is a sample for your configuration for Ruby to capture an element by" XPath" +```rb title="This is a sample for your configuration for Ruby to capture an element by XPath" options = { element: { xpath: 'Required Xpath', @@ -394,7 +394,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Screenshot Name", options -```rb title="This is a sample for your webhook configuration for Ruby to capture an element by CSS" Selector" +```rb title="This is a sample for your webhook configuration for Ruby to capture an element by CSS Selector" options = { element: { cssSelector: 'Required CSS Selector', @@ -463,7 +463,7 @@ end **Example:** ```ruby -LambdaTest::Selenium::Driver.smartui_snapshot(driver, HomePage-Header") +LambdaTest::Selenium::Driver.smartui_snapshot(driver, "HomePage-Header") LambdaTest::Selenium::Driver.smartui_snapshot(driver, "ProductPage-MainContent") ``` @@ -483,7 +483,7 @@ require 'selenium-webdriver' driver.navigate.to 'https://example.com' wait = Selenium::WebDriver::Wait.new(timeout: 10) wait.until { driver.find_element(id: 'main-content') } -LambdaTest::Selenium::Driver.smartui_snapshot(driver, Page Loaded") +LambdaTest::Selenium::Driver.smartui_snapshot(driver, "Page Loaded") ``` @@ -587,7 +587,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, Page Loaded") 2. Enable JavaScript in configuration: ```json { - enableJavaScript": true + "enableJavaScript": true } ``` @@ -643,7 +643,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, Page Loaded") ``` 5. Update Gemfile with specific version: ```ruby - gem 'lambdatest-selenium-driver', '~"> 1.0' + gem 'lambdatest-selenium-driver', '~> 1.0' ``` diff --git a/docs/smartui-testcafe-sdk.md b/docs/smartui-testcafe-sdk.md index 90d574473..e54346413 100644 --- a/docs/smartui-testcafe-sdk.md +++ b/docs/smartui-testcafe-sdk.md @@ -233,7 +233,7 @@ When conducting visual tests, you may encounter scenarios where certain elements -```js title="This is a sample for your configuration for Testcafe to ignore by" ID" +```js title="This is a sample for your configuration for Testcafe to ignore by ID" let options = { ignoreDOM: { id: ["ID-1", "ID-2"], @@ -245,7 +245,7 @@ let options = { -```js title="This is a sample for your configuration for Testcafe to ignore by" Class" +```js title="This is a sample for your configuration for Testcafe to ignore by Class" let options = { ignoreDOM: { class: ["Class-1", "Class-2"], @@ -257,7 +257,7 @@ let options = { -```js title="This is a sample for your configuration for Testcafe to ignore by" XPath" +```js title="This is a sample for your configuration for Testcafe to ignore by XPath" let options = { ignoreDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -270,7 +270,7 @@ let options = { -```js title="This is a sample for your configuration for Testcafe to ignore by CSS" Selector" +```js title="This is a sample for your configuration for Testcafe to ignore by CSS Selector" let options = { ignoreDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -297,7 +297,7 @@ let options = { -```js title="This is a sample for your configuration for Testcafe to select by" Class" +```js title="This is a sample for your configuration for Testcafe to select by Class" let options = { selectDOM: { class: ["Class-1", "Class-2"], @@ -309,7 +309,7 @@ let options = { -```js title="This is a sample for your configuration for Testcafe to select by" XPath" +```js title="This is a sample for your configuration for Testcafe to select by XPath" let options = { selectDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -322,7 +322,7 @@ let options = { -```js title="This is a sample for your webhook configuration for Testcafe to select by CSS" Selector" +```js title="This is a sample for your webhook configuration for Testcafe to select by CSS Selector" let options = { selectDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -353,7 +353,7 @@ let options = { -```js title="This is a sample for your configuration for Testcafe to capture an element by" Class" +```js title="This is a sample for your configuration for Testcafe to capture an element by Class" let options = { element: { class: 'Required Class', @@ -365,7 +365,7 @@ let options = { -```js title="This is a sample for your configuration for Testcafe to capture an element by" XPath" +```js title="This is a sample for your configuration for Testcafe to capture an element by XPath" let options = { element: { xpath: 'Required Xpath', @@ -378,7 +378,7 @@ let options = { -```js title="This is a sample for your webhook configuration for Testcafe to capture an element by CSS" Selector" +```js title="This is a sample for your webhook configuration for Testcafe to capture an element by CSS Selector" let options = { element: { cssSelector: 'Required CSS Selector', @@ -461,7 +461,7 @@ await smartuiSnapshot(t, 'ProductPage-MainContent'); fixture `Page Test` .page `https://example.com`; -test('Take screenshot after page loads', async t ="> { +test('Take screenshot after page loads', async t => { await t.expect(Selector('#main-content').exists).ok(); await t.wait(1000); // Wait for animations await smartuiSnapshot(t, 'Page Loaded'); @@ -569,7 +569,7 @@ test('Take screenshot after page loads', async t ="> { 2. Enable JavaScript in configuration: ```json { - enableJavaScript": true + "enableJavaScript": true } ``` diff --git a/docs/smartui-wdio-sdk.md b/docs/smartui-wdio-sdk.md index df25d62d9..bbd664b09 100644 --- a/docs/smartui-wdio-sdk.md +++ b/docs/smartui-wdio-sdk.md @@ -238,7 +238,7 @@ When conducting visual tests, you may encounter scenarios where certain elements -```js title="This is a sample for your configuration for JavaScript to ignore by" ID" +```js title="This is a sample for your configuration for JavaScript to ignore by ID" let options = { ignoreDOM: { id: ["ID-1", "ID-2"], @@ -251,7 +251,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to ignore by" Class" +```js title="This is a sample for your configuration for JavaScript to ignore by Class" let options = { ignoreDOM: { class: ["Class-1", "Class-2"], @@ -264,7 +264,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to ignore by" XPath" +```js title="This is a sample for your configuration for JavaScript to ignore by XPath" let options = { ignoreDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -278,7 +278,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to ignore by CSS" Selector" +```js title="This is a sample for your configuration for JavaScript to ignore by CSS Selector" let options = { ignoreDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -294,7 +294,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to select by" ID" +```js title="This is a sample for your configuration for JavaScript to select by ID" let options = { selectDOM: { id: ["ID-1", "ID-2"], @@ -307,7 +307,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to select by" Class" +```js title="This is a sample for your configuration for JavaScript to select by Class" let options = { selectDOM: { class: ["Class-1", "Class-2"], @@ -320,7 +320,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to select by" XPath" +```js title="This is a sample for your configuration for JavaScript to select by XPath" let options = { selectDOM: { xpath: ["Xpath-1", "Xpath-2"], @@ -334,7 +334,7 @@ let options = { -```js title="This is a sample for your webhook configuration for JavaScript to select by CSS" Selector" +```js title="This is a sample for your webhook configuration for JavaScript to select by CSS Selector" let options = { selectDOM: { cssSelector: ["CSS-Selector-1", "CSS-Selector-2"], @@ -367,7 +367,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to capture an element by" Class" +```js title="This is a sample for your configuration for JavaScript to capture an element by Class" let options = { element: { class: 'Required Class', @@ -380,7 +380,7 @@ let options = { -```js title="This is a sample for your configuration for JavaScript to capture an element by" XPath" +```js title="This is a sample for your configuration for JavaScript to capture an element by XPath" let options = { element: { xpath: 'Required Xpath', @@ -394,7 +394,7 @@ let options = { -```js title="This is a sample for your webhook configuration for JavaScript to capture an element by CSS" Selector" +```js title="This is a sample for your webhook configuration for JavaScript to capture an element by CSS Selector" let options = { element: { cssSelector: 'Required CSS Selector', @@ -542,7 +542,7 @@ await smartuiSnapshot(driver, 'Page Loaded'); 2. Enable JavaScript in configuration: ```json { - enableJavaScript": true + "enableJavaScript": true } ```