Skip to content

Commit 66eb381

Browse files
committed
smartui pdf sdk fixes
1 parent 3f477d4 commit 66eb381

File tree

1 file changed

+31
-18
lines changed

1 file changed

+31
-18
lines changed

docs/smartui-pdf-comparison.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,16 @@ This CLI method streamlines PDF uploads and result retrieval, making it ideal fo
204204

205205
For developers who prefer programmatic control, SmartUI provides a Java SDK to upload PDFs and manage visual regression testing programmatically.
206206

207-
### Step 1: Install the SmartUI Java SDK
207+
### Step 1: Clone the Sample Project
208+
209+
First, clone the sample project to get started:
210+
211+
```bash
212+
git clone https://github.com/LambdaTest/junit-selenium-sample.git
213+
cd junit-selenium-sample
214+
```
215+
216+
### Step 2: Install the SmartUI Java SDK
208217

209218
Add the SmartUI Java SDK to your `pom.xml`:
210219

@@ -216,7 +225,13 @@ Add the SmartUI Java SDK to your `pom.xml`:
216225
</dependency>
217226
```
218227

219-
### Step 2: Set up your credentials
228+
Then compile your project:
229+
230+
```bash
231+
mvn clean compile
232+
```
233+
234+
### Step 3: Set up your credentials
220235

221236
<Tabs className="docs__val">
222237

@@ -250,16 +265,15 @@ set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"`}
250265
<CodeBlock className="language-powershell">
251266
{`$Env:LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}"
252267
$Env:LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"
253-
$Env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"`
254-
268+
$Env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"`}
255269
</CodeBlock>
256270
</div>
257271

258272
</TabItem>
259273

260274
</Tabs>
261275

262-
### Step 3: Upload PDFs using Java SDK
276+
### Step 4: Upload PDFs using Java SDK
263277

264278
You can upload PDFs in two modes:
265279

@@ -269,6 +283,8 @@ You can upload PDFs in two modes:
269283

270284
Upload pre-existing PDFs from your local machine:
271285

286+
> 📁 **Sample File**: [`SmartuiPdfLocalTest.java`](https://github.com/LambdaTest/junit-selenium-sample/blob/master/src/test/java/com/smartuiPdf/SmartuiPdfLocalTest.java)
287+
272288
```java
273289
import io.github.lambdatest.SmartUIConfig;
274290
import io.github.lambdatest.SmartUIPdf;
@@ -299,6 +315,8 @@ public class SmartuiPdfLocalTest {
299315

300316
Upload PDFs downloaded during LambdaTest cloud test execution:
301317

318+
> 📁 **Sample File**: [`SmartuiPdfCloudTest.java`](https://github.com/LambdaTest/junit-selenium-sample/blob/master/src/test/java/com/smartuiPdf/SmartuiPdfCloudTest.java)
319+
302320
```java
303321
import org.openqa.selenium.WebDriver;
304322
import org.openqa.selenium.JavascriptExecutor;
@@ -339,15 +357,15 @@ public class SmartuiPdfCloudTest {
339357

340358
</Tabs>
341359

342-
### Step 4: Configuration Options
360+
### Step 5: Configuration Options
343361

344362
| Method | Description |
345363
|-------|-------------|
346364
| `.withProjectToken(token)` | Required. Your SmartUI project token. |
347365
| `.withFetchResult(true)` | Optional. Returns structured test results. |
348366
| `.withBuildName("v2.1")` | Optional. Assign a custom build name. |
349367

350-
### Step 5: Run your tests
368+
### Step 6: Run your tests
351369

352370
```bash
353371
mvn test
@@ -357,14 +375,9 @@ The SDK method provides programmatic control over PDF uploads and is ideal for i
357375

358376
## Use Cases of Smart PDF Comparison
359377

360-
1. **Software Documentation**: In software development, PDF comparison can be utilized to ensure the accuracy and consistency of user manuals, system documentation, and more. It can help in tracking changes made in the document across different software versions or updates.
361-
362-
2. **Legal and Compliance Checks**: In legal practices and compliance-heavy industries, comparing different versions of contracts, agreements, or regulatory documents is common. With PDF comparison, one can easily spot differences, alterations, or anomalies, ensuring every detail aligns with legal and compliance requirements.
363-
364-
3. **Design Validation**: For graphic designers, artists, or anyone involved in the creation of visual content, PDF comparison can be used to validate design changes and ensure consistency across different versions of a design.
365-
366-
4. **Proofreading and Editing**: In the publishing industry or any other industry where documents are created and edited, the PDF comparison feature can be invaluable. It can help detect any changes made between different versions of a document, allowing editors and proofreaders to quickly find and correct mistakes.
367-
368-
5. **Quality Assurance**: In industries where accuracy is paramount, such as manufacturing or engineering, PDF comparison can be used for quality assurance. Comparing design specs, product blueprints, or operational guidelines can ensure consistency and adherence to quality standards.
369-
370-
6. **Archiving and Record Keeping**: For businesses or organizations that need to maintain records over a long period, PDF comparison can help verify the accuracy and integrity of these archives. It can highlight any alterations or modifications made to a document over time.
378+
- **Software Documentation**: Track changes and ensure consistency across document versions.
379+
- **Legal & Compliance**: Spot differences in contracts or regulatory documents.
380+
- **Design Validation**: Verify design updates and maintain visual consistency.
381+
- **Proofreading**: Detect edits between document versions for quick review.
382+
- **Quality Assurance**: Compare specs or blueprints to uphold standards.
383+
- **Archiving**: Confirm integrity of records over time by highlighting modifications.

0 commit comments

Comments
 (0)