Skip to content

Commit e63ea8f

Browse files
lambda hooks
1 parent 181a846 commit e63ea8f

File tree

1 file changed

+12
-33
lines changed

1 file changed

+12
-33
lines changed

docs/lambda-hooks.md

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -57,39 +57,18 @@ Below is the representation of the available Lambda Hooks along with the functio
5757
| *lambda-build* | For updating the build name.<br />`executeScript("lambda-build=BUILD_NAME");` |
5858
| *lambda-action* | Used to mark a test as passed/failed. Moreover, it allows the option to include a failure reason, which will be visible on the LambdaTest Automation Dashboard inside the session view.<br />`Map<String, String> action = new HashMap();action.put("status", "failed"); action.put("reason", "tmp reason"); driver.executeScript("lambda-action", action);` <br /> <br />`((JavascriptExecutor) driver).executeScript("lambda-action=" + "Lambda Error");` |
5959
| *lambda-perform-keyboard-events* | You can seamlessly simulate keyboard shortcuts like **ctrl + c**, **ctrl + v** in automation test scenarios. This hook is supported on both Windows and MacOS. <br /> `js.executeScript("lambda-perform-keyboard-events:tab");`|
60-
| *lambda_breakpoint* | Aborts the test execution to use the live interaction feature. <br/>`driver.executeScript("lambda-breakpoint=true");` |
61-
| *lambda_screenshot* | Captures the async screenshot during test execution. <br/>`driver.executeScript("lambda-screenshot=true");` |
62-
| *lambda_files_delete* | Deletes the file in the download directory in the virtual machines (VMs).<br/>`driver.executeScript("lambda-files-delete=file1.csv,file2.csv);` |
63-
| *lambda_network_throttle* | Throttles network speed during test execution.<br/>`executeScript("lambda-throttle-network","Regular 4G")` |
64-
| *lambda_ping* | Fetches the IPs of the domain.<br/>`driver.executeScript("lambda-ping=lambdatest.com");` |
65-
| *lambda_exceptions* | Uploads the exceptions for tests that are captured on the console.<br/>`driver.executeScript('lambda-exceptions', [[message]])` |
66-
| *lambda_get_clipboard* | Prints the clipboard data on the console.<br/>`driver.executeScript("lambda-get-clipboard");` |
67-
| *lambda_set_clipboard* | Sets the clipboard data.<br/>`driver.executeScript("lambda-set-clipboard= Amit");` |
68-
| *lambda_clear_clipboard* | Clears the data of the clipboard.<br/>`driver.executeScript("lambda-clear-clipboard");` |
60+
| *lambda_breakpoint* | Aborts the test execution to use the live interaction feature. <br/>`driver.executeScript("lambda-breakpoint=true");`|
61+
| *lambda_screenshot* | Captures the async screenshot during test execution. <br/>`driver.executeScript("lambda-screenshot=true");`|
62+
| *lambda_files_delete* | Deletes the file in the download directory in the virtual machines (VMs).<br/>`driver.executeScript("lambda-files-delete=file1.csv,file2.csv);`|
63+
| *lambda_network_throttle* | Throttles network speed during test execution.<br/>`executeScript("lambda-throttle-network","Regular 4G")`|
64+
| *lambda_ping* | Fetches the IPs of the domain.<br/>`driver.executeScript("lambda-ping=lambdatest.com");`|
65+
| *lambda_exceptions* | Uploads the exceptions for tests that are captured on the console.<br/>`driver.executeScript('lambda-exceptions', [[message]])`|
66+
| *lambda_get_clipboard* | Prints the clipboard data on the console.<br/>`driver.executeScript("lambda-get-clipboard");`|
67+
| *lambda_set_clipboard* | Sets the clipboard data.<br/>`driver.executeScript("lambda-set-clipboard= Amit");`|
68+
| *lambda_clear_clipboard* | Clears the data of the clipboard.<br/>`driver.executeScript("lambda-clear-clipboard");`|
6969
| *lambda_unbound_ping* | Fetches the IPs from the outbound domain.<br/>`driver.executeScript("lambda-unbound-ping=lambdatest.com");`
7070
| *lambda:network* | Fetches the network log entries in array format during session.<br/><br/>`driver.execute_script("lambda:network");`- Fetch the network log from last fetch request time to current time.<br/><br/>`driver.execute_script("lambda:network=all");`- Fetch from start of test session to current time.
71-
| *lambdaUpdateName* | Sets the test name during test execution.<br/><br/>`driver.executeScript("lambdaUpdateName=TestName");`
71+
| *lambdaUpdateName* | Sets the test name during test execution.<br/><br/>`driver.executeScript("lambdaUpdateName=TestName");` |
72+
| *lambda-test-tags* | Dynamically update your test tags for a test session which can be used to organize and filter your test results. <br /> **Syntax :** `driver.executeScript("lambda-test-tags=Tag 1,Tag 3Jan,Tag 2");` <br /> <br /> **Limitations :** <br /> **1. Maximum Character Length per Tag:** Each tag can have up to 50 characters. <br /> **2. Maximum Number of Tags:** A maximum of 15 tags can be assigned to a single test session. |
7273

73-
> **Note**: These hooks will only work if you're connected to your [LambdaTest Hub URL](/support/docs/hyperexecute-general-faqs/#17-how-can-i-access-my-lambdatest-hub-url). If you use these hooks on any other platform, you might see the error: `javascript error: Invalid left-hand side in assignment`
74-
75-
Got Questions? Give a **<span className="doc__lt" onClick={() => window.openLTChatWidget()}>Shout</span>** to us. We're here for you 24/7. <br />Happy testing! :)
76-
77-
<nav aria-label="breadcrumbs">
78-
<ul className="breadcrumbs">
79-
<li className="breadcrumbs__item">
80-
<a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com">
81-
Home
82-
</a>
83-
</li>
84-
<li className="breadcrumbs__item">
85-
<a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com/support/docs/">
86-
Support
87-
</a>
88-
</li>
89-
<li className="breadcrumbs__item breadcrumbs__item--active">
90-
<span className="breadcrumbs__link">
91-
Lambda Hooks
92-
</span>
93-
</li>
94-
</ul>
95-
</nav>
74+
> **Note**: These hooks will only work if you're connected to your [LambdaTest Hub URL](/support/docs/hyperexecute-general-faqs/#17-how-can-i-access-my-lambdatest-hub-url). If you use these hooks on any other platform, you might see the error: `javascript error: Invalid left-hand side in assignment`

0 commit comments

Comments
 (0)