You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| browsers | You can add all the supported browsers brands here to run your tests for SmartUI. <br/> Ex: `"chrome", "firefox", "safari", "edge", etc..`| Mandatory |
211
-
|resolutions| You can add all the supported browser viewpoints here to run your tests for SmartUI <br/> Ex: `[1920, 1080],[width, height] etc..` <br/> | Mandatory |
211
+
|viewports| You can add all the supported browser viewpoints here to run your tests for SmartUI <br/> Ex: `[1920, 1080],[width, height] etc..` <br/> | Mandatory |
212
212
213
213
214
214
## **Step 5:** Execute the Tests on SmartUI Cloud using CLI
@@ -219,6 +219,47 @@ You can now execute tests for `Visual Regression Testing` using the following op
## Executing browser scripts using the Capture Command
223
+
224
+
SmartUI CLI provides the flexibility to execute custom JavaScript code on target URLs at specific stages of the snapshot process. This feature is crucial for:
225
+
226
+
- Interacting with dynamic elements
227
+
- Managing loading states
228
+
- Modifying page content
229
+
- Validating page states
230
+
- Performing actions like accepting cookies, clicking on buttons, etc.
231
+
These capabilities ensure that your visual tests accurately capture the true representation of your web pages.
232
+
233
+
You can execute any valid JavaScript code that you would typically run inside a browser. For example, to simulate a button click, you might use:
The `execute` option accepts an object with the following keys:
242
+
243
+
-**afterNavigation**: This function is called after the page navigates to the specified URL. It is useful for actions that need to occur once the page has loaded.
244
+
245
+
-**beforeSnapshot**: This function is called just before SmartUI captures a snapshot. It is ideal for final adjustments or interactions needed to prepare the page for capture.
0 commit comments