Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/espresso-visual-regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```
Expand Down Expand Up @@ -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
}
```

Expand Down
9 changes: 5 additions & 4 deletions docs/selenium-visual-regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://" +"<Your Username>" +":" +"<Your Access Key>" + `hub.lambdatest.com/wd/hub`.format(username, access_key),options=options)
command_executor="https://" + "<Your Username>" + ":" + "<Your Access Key>" + "@hub.lambdatest.com/wd/hub", options=options)
```

</TabItem>
Expand All @@ -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://" +"<Your Username>" +":" +"<Your Access Key>" + `hub.lambdatest.com/wd/hub`.format(username, access_key),options=options)
command_executor="https://" + "<Your Username>" + ":" + "<Your Access Key>" + "@hub.lambdatest.com/wd/hub", options=options)
```

</TabItem>
Expand Down Expand Up @@ -438,8 +438,9 @@ Add the following **Webhook** to your test cases where you need to capture the s
```javascript
let config = {
screenshotName: '<Screenshot Name>',
elementType: 'xpath'/'css_selector'/'id'/'class', //Choose one from the following options - xpath, css_selector, id or class
element: '<Required Element>' //Add your required element here
elementType: 'xpath', //Choose one of: xpath, css_selector, id, class
element: '<Required Element>'
};
await driver.executeScript("smartui.takeScreenshot", config);
```
</TabItem>
Expand Down
4 changes: 4 additions & 0 deletions docs/smartui-appium-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

</TabItem>

<TabItem value='ruby-2' label='Ruby' default>

```ruby
Expand Down
10 changes: 5 additions & 5 deletions docs/smartui-appium-java-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -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");
```

Expand All @@ -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");
```

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -472,8 +472,8 @@ SmartUISnapshot.smartuiSnapshot(driver, "Screen Loaded");
2. Ensure elements exist at screenshot time
3. Check JSON formatting in configuration:
```java
Map<String, Object"> ignoreBoxes = new HashMap<">();
ignoreBoxes.put(xpath", new String[]{"//*[@text="'Dynamic" Ad']"});
Map<String, Object> ignoreBoxes = new HashMap<>();
ignoreBoxes.put("xpath", new String[]{"//*[@text='Dynamic Ad']"});
```

4. Test XPath locators in isolation before using in config
Expand Down
2 changes: 1 addition & 1 deletion docs/smartui-approval-workflow-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions docs/smartui-cli-env-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ In case you are accessing your network using corporate proxies, set the proxies

```bash
export HTTP_PROXY="http://<username>:<password>@<domain.com>:<port>/"
```

</TabItem>
<TabItem value="Windows-4" label='Windows - CMD'>

```bash
Expand Down
46 changes: 23 additions & 23 deletions docs/smartui-cypress-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,50 +258,50 @@ When conducting visual tests, you may encounter scenarios where certain elements
<Tabs className='docs__val' groupId='framework'>
<TabItem value='IgnoreID' label='Ignore ID' default>

```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);
```

</TabItem>
<TabItem value='IgoreClass' label='Ignore Class'>

```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);
```

</TabItem>
<TabItem value='IgnoreXPath' label='Ignore XPath'>

```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);
```

</TabItem>

<TabItem value='IgnoreSelector' label='Ignore CSS Selector'>

```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);
```
</TabItem>

Expand All @@ -316,44 +316,44 @@ let options = {
id: ["ID-1", "ID-2"],
}
}
cy.smartuiSnapshot(Screenshot Name, options);
cy.smartuiSnapshot('Screenshot Name', options);
```

</TabItem>
<TabItem value='SelectClass' label='Select Class'>

```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);
```

</TabItem>
<TabItem value='SelectXPath' label='Select XPath'>

```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);
```

</TabItem>

<TabItem value='SelectSelector' label='Select CSS Selector'>

```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);
```
</TabItem>

Expand All @@ -372,45 +372,45 @@ let options = {
id: 'Required ID',
}
};
cy.smartuiSnapshot(Screenshot Name, options);
cy.smartuiSnapshot('Screenshot Name', options);
```

</TabItem>
<TabItem value='ElementClass' label='Capture Element by Class'>

```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);
```

</TabItem>
<TabItem value='ElementXPath' label='Capture Element by XPath'>

```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);

```

</TabItem>

<TabItem value='ElementSelector' label='Capture Element by Selector'>

```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);
```
</TabItem>

Expand Down Expand Up @@ -560,7 +560,7 @@ cy.smartuiSnapshot('Page Loaded');
2. Enable JavaScript in configuration:
```json
{
enableJavaScript": true
"enableJavaScript": true
}
```

Expand Down
12 changes: 6 additions & 6 deletions docs/smartui-pdf-java-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -179,7 +179,7 @@ Upload PDFs downloaded during <BrandName /> 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)
Expand Down Expand Up @@ -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"
};
```
Expand All @@ -326,7 +326,7 @@ String[] pdfPaths = {

**Example:**
```java
config.withBuildName(PDF-Comparison-v1.0-" + LocalDate.now());
config.withBuildName("PDF-Comparison-v1.0-" + LocalDate.now());
```

</TabItem>
Expand Down Expand Up @@ -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");
}
Expand Down Expand Up @@ -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());
}
Expand Down
Loading