Skip to content

Commit ee596e3

Browse files
authored
v1.4.2
1 parent 5caf083 commit ee596e3

5 files changed

Lines changed: 1064 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"userName": "John Doe",
3+
"userEmail": "JohnDoe@gmail.com",
4+
"currentAddress": "742 Evergreen Terrace, Springfield, OR 97477",
5+
"permanentAddress": "10 Downing Street, London, SW1A 2AA",
6+
"submit": "true"
7+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# User Guide: Testing the WebView2 MASTER DEMO
2+
3+
To see the power of the **NetWebView2Lib v1.4.2**, follow these step-by-step instructions for the specific demo scenarios.
4+
5+
### 1. Requirements & Setup
6+
7+
- **Bridge File**: Ensure `_Bridge.js` is in the same directory as the script. It contains the logic for scraping and form mapping.
8+
9+
- **Library**: The `NetWebView2Lib.dll` must be registered on your system (`RegAsm`).
10+
11+
- **Assets**: Ensure the `Forms_Data` folder exists if you want to test the pre-saved form filling.
12+
13+
14+
---
15+
16+
### 2. Scenario A: Wikipedia (Data Scraping & Massive Screenshots)
17+
18+
The demo starts automatically on the Wikipedia population page. This page is perfect for testing high-volume data handling.
19+
20+
- **Extra Long "Full Page Screenshot"**:
21+
22+
1. Go to the **Features** menu (Star icon) -> **Full Page Screenshot**.
23+
24+
2. **What happens**: The script calculates the document height (often over **26,000 pixels**).
25+
26+
3. **GPU Protection**: If the height exceeds the hardware limit (**16,384 pixels**), the script automatically calculates a **Dynamic Scale Factor** (e.g., 0.62x) to ensure the capture is successful without "ghosting" or memory corruption.
27+
28+
4. **Result**: A perfectly rendered PNG of the entire page is saved and opened automatically.
29+
30+
- **Direct Table Export (Context Menu)**:
31+
32+
1. **Right-click** anywhere inside the main data table (the list of countries).
33+
34+
2. Select the dynamic option: **📥 Export this Table to CSV**.
35+
36+
3. **What happens**: AutoIt asks JavaScript to parse the specific table under your mouse, converts it to a CSV string, saves it, and opens it in Excel/Notepad.
37+
38+
- **Scan for HTML Tables**:
39+
40+
1. Select **Scan for HTML Tables** from the Features menu.
41+
42+
2. An InputBox will appear listing all detected tables and their row counts.
43+
44+
3. Enter a number (e.g., `0`) to extract that specific table.
45+
46+
47+
---
48+
49+
### 3. Scenario B: DemoQA (Form Automation & JSON Mapping)
50+
51+
Switch to the form testing site to see how AutoIt handles structured data.
52+
53+
1. Click the **Application Menu** (First icon on the left) and select **demoqa**.
54+
55+
2. Once the "Text Box" page loads:
56+
57+
- **Fill Form from JSON**: Right-click the form area and select **Fill Form from JSON File**.
58+
59+
- Navigate to `Forms_Data\` and select the file `DEMOQA_form_20260108-1223-43111.json`.
60+
61+
- **Result**: The script uses **Base64 encoding** to safely pass the JSON to the browser, and JavaScript instantly populates all fields (Name, Email, Addresses).
62+
63+
3. **Map Form (Save)**: Fill in some random data yourself, right-click, and select **Save Form Map to JSON File**. This creates a reusable template for that specific page.
64+
65+
66+
---
67+
68+
### 4. Advanced Toolset Overview
69+
70+
|**Feature**|**How to use**|**Why it matters**|
71+
|---|---|---|
72+
|**Audit Highlights**|Features -> Highlights|Visually debugs which HTML elements the script is targeting.|
73+
|**Custom CSS Injection**|Features -> Inject Custom CSS|Demonstrates how to force "Dark Mode" or UI changes on any website.|
74+
|**Extension Picker**|App Menu -> Extensions Manager|Allows loading of Chrome extensions (uBlock, Ghostery) from a local folder.|
75+
|**Browser Cleanup**|App Menu -> Clear browser history|One-click deletion of cookies and cache using the internal API.|
76+
|**DevTools**|Right-click -> Inspect Element|Opens the standard F12 developer tools for deep debugging.|
77+
78+
---
79+
80+
### Pro Debugging Tip
81+
82+
Keep your **SciTE Console (F8)** open while running the demo. You will see real-time logs of:
83+
84+
- URL changes and Navigation status.
85+
86+
- JSON data payloads being sent through the **JavaScript Bridge**.
87+
88+
- COM Errors caught by the `_ErrFunc` handler.
89+
90+
---

0 commit comments

Comments
 (0)