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
Make sure you have your LambdaTest credentials with you to run test automation scripts on LambdaTest Selenium Grid. You can obtain these credentials from the [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build) or through [LambdaTest Profile](https://accounts.lambdatest.com/login).
89
91
90
92
**Step 3:** Set LambdaTest `Username` and `Access Key` in environment variables.
set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
108
+
</CodeBlock>
109
+
</div>
110
+
</TabItem>
111
+
</Tabs>
99
112
100
113
## Run Your First Test
101
114
***
102
115
### Sample Test with NightwatchJS
103
116
Let’s check out a sample **Nightwatch** framework code running on LambdaTest Selenium Grid. This is a simple Nightwatch automation script that tests a sample to-do list app. The code marks two list items as done, adds a list item and then finally gives the total number of pending items as output.
104
-
```js
105
-
//googleTest.js
106
-
107
-
var https =require("https");
108
-
var lambdaRestClient =require("@lambdatest/node-rest-client");
109
-
var lambdaCredentials = {
110
-
username:process.env.LT_USERNAME,
111
-
accessKey:process.env.LT_ACCESS_KEY
112
-
};
113
-
var lambdaAutomationClient =lambdaRestClient.AutomationClient(
**Step 4:** Below is the `nightwatch.conf.js` file where we will be declaring the desired capabilities. Since we are using remote webdriver, we have to define which browser environment we want to run the test. We do that by passing browser environment details to LambdaTest Selenium Grid via desired capabilities class.
> You can generate capabilities for your test requirements with the help of our inbuilt **[Capabilities Generator tool](https://www.lambdatest.com/capabilities-generator/)**.
Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on [LambdaTest automation dashboard](https://automation.lambdatest.com/build). LambdaTest Automation Dashboard will help you view all your text logs, screenshots and video recording for your entire automation tests.
135
+
Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on [LambdaTest automation dashboard](https://automation.lambdatest.com/build).
0 commit comments