{"info":{"_postman_id":"57b57572-1b70-42e0-8362-6ff3bfe71df0","name":"Automate chrome browser","description":"<html><head></head><body><p><img src=\"https://d2o2utebsixu4k.cloudfront.net/media/images/410dbe5b-51b1-4b26-98e5-fba4e1f25497.jpg\" alt=\"image\"></p>\n<h2 id=\"introduction\">Introduction</h2>\n<p>The aim of this collection is to make you familiarized with test automation concept and reiterate that test automation is all about calling rest apis and nothing else. </p>\n<p>in this collection we just start the chromedriver which starts an api server and exposes all its internal implementation through w3c compliant endpoints</p>\n<p>so as a client we just have to call these endpoints to automate the the target (<strong>here chrome browser</strong>). All these selenium, webdriverio standalone etc are just httpclient libraries that calls these endpoints.</p>\n<h2 id=\"usage-instruction\">Usage instruction</h2>\n<p>click run in postman to open this collection in postman</p>\n<h2 id=\"short-story\">short story:</h2>\n<p>1). Just start chrome driver in cmd (run chromedriver.exe)</p>\n<p><img src=\"https://github.com/praveendvd/fileshare/blob/main/chromedriver_start.JPG?raw=true\" alt=\"\"></p>\n<p><strong>Note:</strong> if you have nodejs you can download chrome driver and start it as simple command as below</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>&gt;npm install -g chromedriver --detect_chromedriver_version &amp;&amp; chromedriver\n</code></pre><p>2). Run the collection in collection runner thats it !!!!!!!!!!!</p>\n<h2 id=\"detailed-step\">Detailed step</h2>\n<ul>\n<li><ol>\n<li>use the already available test step flow in the pre-request script section of \"Test steps\" request.</li>\n</ol>\n</li>\n</ul>\n<p><strong>Note</strong>: You can modify the test step flow in the pre request section of the <strong>\"Test steps\"</strong> request once you are familiar with this collection</p>\n<p>the test cases are in a data table format with step accepts keywords like the <strong>requestname</strong>, <strong>assert</strong> and <strong>wait</strong>. </p>\n<p><strong>key</strong> and <strong>value</strong> are the information we use to drive the test like location strategy , variable to use , value to compare etc</p>\n<ul>\n<li><ol>\n<li>After defining test just start chromedriver.exe in your command line</li>\n</ol>\n</li>\n<li><ol>\n<li>now run this collection in collection runner or newman</li>\n</ol>\n</li>\n</ul>\n<h2 id=\"theory\">Theory</h2>\n<h2 id=\"introduction-1\">Introduction</h2>\n<p>The aim of this workspace is to make you familiarized with test automation concept and reiterate that test auomtion is all about calling rest apis and nothing else. </p>\n<p>in this workspace i have created a demo collection that can drive your automation and also have a complete webdriver w3c endpoint collection for your reference</p>\n<p>so as a client we just have to call these endpoints to automate the the target (<strong>here chrome browser</strong>). All these selenium, webdriverio standalone etc are just httpclient libraries that calls these endpoints.</p>\n<h2 id=\"let-us-start-by-understanding-how-easy-is-device-automation\">Let us start by understanding how easy is device Automation:</h2>\n<p>let's see what is automation is all about</p>\n<h2 id=\"old-implementation\">Old implementation:</h2>\n<p>So previously there were no standards on device or web automation. Each device vendor releases a utility or tool called a driver that knows how to automate their product.</p>\n<p>so for example for automating the windows app we have WinAppDriver, for automating chrome we have Chromedriver and so on. These tools have all implementations, code logic etc on how to automate their product (Yes you are right everything is already done for you)</p>\n<p>Now they expose these implementations through rest API, rest APIs are nothing but an abstract public method that listens to HTTP calls and triggers the actual code logic under the hood when the user calls that rest endpoint. It just hides all the internal complex implementation so that users don't get scared.</p>\n<p><img src=\"https://miro.medium.com/max/639/1*zKsLSCjyMmQi2LB7SlzCaQ.png\" alt=\"old implementation\"></p>\n<p><strong>An example API:</strong></p>\n<p>Yes, API is just a function!!! here we are saying if the user does a post to /findElement then do all complex things and return the element</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\n\napp.post('/findElement', (req, res) =&gt; {\n\n\n// do all complex emplementation on finding element\n\n\nreturn element\n\n\n});\n\n</code></pre><h3 id=\"challenge\">Challenge:</h3>\n<p>The challenge of not having a standard was that each vendor implemented the API in a different way, this causes issues with cross-device or browser testing. You cannot use the same code for testing different browsers or devices</p>\n<h3 id=\"solution\">Solution:</h3>\n<p>so solutions like Appium, Selenium etc came up with a wrapper server that creates another abstraction and exposes everything using JSON wire protocol (its still rest api just enforced how the endpoints, response and requests should look like), so you can use the same API to automate all devices or browsers. Routing of commands to correct browser or device will be handled by selenium or appium server !!! again all things are already done for you</p>\n<h2 id=\"new-implementation\">New implementation:</h2>\n<p>Now things have changed for good!!!!! atlast the w3c which is organisation that defines web standards have brought in something called w3c protocol (its still rest api just enforced how the endpoints, response and requests should look like) now all vendors need to follow this standard while exposing the implementation through API so now we no longer need selenium or Appium server when w3c standard get implemented full fledge</p>\n<p><img src=\"https://miro.medium.com/max/630/1*PkVAb1-oVlDMwjUko1Yy3Q.png\" alt=\"enter image description here\"></p>\n<h3 id=\"so-coming-back-to-what-is-all-this-automation-about\">So coming back to what is all this automation about:</h3>\n<ul>\n<li><p>selenium or appium server setup (just start it nothing else !!!) [ till full w3c is implemented by all vendors, once that's done we no longer need the intermediatory servers server step]</p>\n</li>\n<li><p>After that, all selenium, webdriverIO etc we use are just HTTP client libraries that call these w3c or json wire protocol from your script. So selenium/Appium are just http client libraries nothing else .its just like your math library you use for adding eg: math.pow etc</p>\n</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"8296678","collectionId":"57b57572-1b70-42e0-8362-6ff3bfe71df0","publishedId":"TzsbKT1V","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-07-26T20:33:28.000Z"},"item":[{"name":"Test steps","event":[{"listen":"prerequest","script":{"id":"8afa685c-987c-4516-8aa4-af695ec9a745","exec":["/**\r"," * Test case or steps is defined here\r"," * you can modify the use case by adding or modifying rows\r"," * */\r"," \r","pm.variables.set(\"testStep\",\r","\r","`\r","\"step\",\"key\",\"value\"\r","\"new Session\",null,null\r","\"navigate To\",\"url\",\"https://www.saucedemo.com/\"\r","\"find Element\",\"css selector\",\"#user-name\"\r","\"element Send Keys\",\"text\",\"standard_user\"\r","\"find Element\",\"css selector\",\"#password\"\r","\"element Send Keys\",\"text\",\"secret_sauce\"\r","\"find Element\",\"css selector\",\"#login-button\"\r","\"element Click\",null,null\r","\"wait\",\"seconds\",2\r","\"find Element\",\"css selector\",\".title\"\r","\"get Title\",\"pageTitle\",null\r","\"assert\",\"title\",\"PRODUCTS\"\r","\"get Element Text\",\"title\",null\r","\"assert\",\"pageTitle\",\"Swag Labs\"\r","\"close Window\",null,null\r","\"new Session\",null,null\r","\"navigate To\",\"url\",\"https://www.saucedemo.com/\"\r","\"find Element\",\"css selector\",\"#user-name\"\r","\"element Send Keys\",\"text\",\"standard_user\"\r","\"find Element\",\"css selector\",\"#password\"\r","\"element Send Keys\",\"text\",\"secret_sauce\"\r","\"find Element\",\"css selector\",\"#login-button\"\r","\"element Click\",null,null\r","\"wait\",\"seconds\",2\r","\"find Element\",\"css selector\",\".title\"\r","\"get Element Text\",\"title\",null\r","\"get Title\",\"pageTitle\",null\r","\"assert\",\"title\",\"PRODUCTS\"\r","\"assert\",\"pageTitle\",\"Swa Labs\"\r","\"close Window\",null,null\r","`\r",")\r","\r","\r",""],"type":"text/javascript"}},{"listen":"test","script":{"id":"965363a6-4872-4b3e-88a6-1901ad16d511","exec":[""],"type":"text/javascript"}}],"id":"707950d1-d069-435d-81d8-509e20c406cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://www.example.com","description":"<p><strong>This request is a dummy request or an intializer request that is used to define the test flow</strong></p>\n<p>We are defining test steps as data table with 3 columns \"step\" , \"key\" and \"value\"</p>\n<p><strong>step</strong> is an enum that accepts keywords like the requestname, assert and wait.</p>\n<p><strong>key</strong> and <strong>value</strong> are the information we use to drive the test like location strategy , variable to use , value to compare etc</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\npm.variables.set(\"testStep\",\n\n`\n\"step\",\"key\",\"value\"\n\"new Session\",null,null\n\"navigate To\",\"url\",\"https://www.saucedemo.com/\"\n\"find Element\",\"css selector\",\"#user-name\"\n\"element Send Keys\",\"text\",\"standard_user\"\n\"find Element\",\"css selector\",\"#password\"\n\"element Send Keys\",\"text\",\"secret_sauce\"\n\"find Element\",\"css selector\",\"#login-button\"\n\"element Click\",null,null\n\"wait\",\"seconds\",2\n\"find Element\",\"css selector\",\".title\"\n\"get Title\",\"pageTitle\",null\n\"assert\",\"title\",\"PRODUCTS\"\n\"get Element Text\",\"title\",null\n\"assert\",\"pageTitle\",\"Swag Labs\"\n\"close Window\",null,null\n\"new Session\",null,null\n\"navigate To\",\"url\",\"https://www.saucedemo.com/\"\n\"find Element\",\"css selector\",\"#user-name\"\n\"element Send Keys\",\"text\",\"standard_user\"\n\"find Element\",\"css selector\",\"#password\"\n\"element Send Keys\",\"text\",\"secret_sauce\"\n\"find Element\",\"css selector\",\"#login-button\"\n\"element Click\",null,null\n\"wait\",\"seconds\",2\n\"find Element\",\"css selector\",\".title\"\n\"get Element Text\",\"title\",null\n\"get Title\",\"pageTitle\",null\n\"assert\",\"title\",\"PRODUCTS\"\n\"assert\",\"pageTitle\",\"Swa Labs\"\n\"close Window\",null,null\n`\n)\n\n\n\n</code></pre>","urlObject":{"protocol":"https","host":["www","example","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"707950d1-d069-435d-81d8-509e20c406cd"},{"name":"new Session","event":[{"listen":"test","script":{"exec":["pm.variables.set(\"sessionId\",pm.response.json().value.sessionId)"],"type":"text/javascript","id":"b500d7a7-e474-4248-bb5f-b57f91431736"}},{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"bee7cdf2-8523-4273-8a0a-2c35d3af629a"}}],"id":"d55f4c4d-0fdb-4e31-ad15-c4325e9467a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"capabilities\": {\n        \"alwaysMatch\": {\n            \"browserName\": \"chrome\",\n            \"acceptInsecureCerts\": true,\n            \"goog:chromeOptions\": {\n                \"w3c\": true\n            }\n        },\n        \"firstMatch\": [\n            {}\n        ]\n    },\n    \"desiredCapabilities\": {\n        \"browserName\": \"chrome\",\n        \"acceptInsecureCerts\": true\n    }\n}"},"url":"http://localhost:9515/session","urlObject":{"path":["session"],"host":["http://localhost:9515"],"query":[],"variable":[]}},"response":[],"_postman_id":"d55f4c4d-0fdb-4e31-ad15-c4325e9467a7"},{"name":"navigate To","event":[{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"a68e88ca-2b27-45ed-afb0-18c38cac5b9d"}}],"id":"4299c85c-519e-42f6-8b25-fd8fdb9f0cf0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"{{key}}\": \"{{value}}\"\n}"},"url":"http://localhost:9515/session/:sessionId/url","urlObject":{"path":["session",":sessionId","url"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"105a71a4-ab54-4659-bc5b-32c5c828b4d7","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"}]}},"response":[],"_postman_id":"4299c85c-519e-42f6-8b25-fd8fdb9f0cf0"},{"name":"refresh","event":[{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"f4c5b812-aa55-4a5d-ae72-20d5a8f207cf"}}],"id":"e574a09f-e228-4ba9-bde3-11811ee4f5ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:9515/session/:sessionId/refresh","urlObject":{"path":["session",":sessionId","refresh"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"77aa6cf5-e9da-4beb-8770-7662c4a69d59","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"}]}},"response":[],"_postman_id":"e574a09f-e228-4ba9-bde3-11811ee4f5ed"},{"name":"find Element","event":[{"listen":"test","script":{"exec":["pm.variables.set(\"elementId\",Object.values(pm.response.json().value)[0])"],"type":"text/javascript","id":"1f1a5b73-6b77-4769-940f-9f60124c59e4"}},{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"2dfe648d-3f16-42c0-8f56-292873475a1d"}}],"id":"f181b4b7-b81c-4db0-856c-940f5bc05037","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"using\": \"{{key}}\",\n    \"value\": \"{{value}}\"\n}"},"url":"http://localhost:9515/session/:sessionId/element","urlObject":{"path":["session",":sessionId","element"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"923cb52a-d2f4-4a72-b642-6cb280551559","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"}]}},"response":[],"_postman_id":"f181b4b7-b81c-4db0-856c-940f5bc05037"},{"name":"minimize Window","event":[{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"04468422-3360-40a5-b3aa-e66d0f97570b"}}],"id":"a728fc1a-214a-4349-89e3-453bc9925ed5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:9515/session/:sessionId/window/minimize","urlObject":{"path":["session",":sessionId","window","minimize"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"b696d6d2-05cf-4c76-92a5-9f98d6e3e5fc","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"}]}},"response":[],"_postman_id":"a728fc1a-214a-4349-89e3-453bc9925ed5"},{"name":"get Element Text","event":[{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"9149199d-9787-4faa-b7ec-b55d87fa6ac8"}},{"listen":"test","script":{"exec":[""],"type":"text/javascript","id":"94a2e811-bc69-4922-83a5-8f62f3697c37"}}],"id":"6a2ecb04-ffcb-460c-8e95-9fa7adb8d660","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:9515/session/:sessionId/element/:elementId/text","urlObject":{"path":["session",":sessionId","element",":elementId","text"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"1ddff34c-e0c3-4098-bcbe-527161d22913","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"},{"id":"9c081843-1665-47e7-a8ba-1022245e0a27","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{elementId}}","key":"elementId"}]}},"response":[],"_postman_id":"6a2ecb04-ffcb-460c-8e95-9fa7adb8d660"},{"name":"element Click","event":[{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"d6722035-73a8-4118-a802-90f87d3bad5b"}}],"id":"a540eedc-88db-43ee-8fce-3f6183053eb2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9515/session/:sessionId/element/:elementId/click","urlObject":{"path":["session",":sessionId","element",":elementId","click"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"f4a3247f-e72f-4064-9663-ea1137d4509f","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"},{"id":"be2822b8-f087-4275-a360-23029196d82f","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{elementId}}","key":"elementId"}]}},"response":[],"_postman_id":"a540eedc-88db-43ee-8fce-3f6183053eb2"},{"name":"element Send Keys","event":[{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"58505773-4629-40d0-9bda-032fb0c8fbac"}}],"id":"705c79bc-7b88-40a6-b52b-67b4ef9bf4b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"{{key}}\": \"{{value}}\"\n}"},"url":"http://localhost:9515/session/:sessionId/element/:elementId/value","urlObject":{"path":["session",":sessionId","element",":elementId","value"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"0cedff65-931c-44f0-8d1a-a73422a70fa4","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"},{"id":"e26e71e8-4b24-4a2a-a1c2-5130c10fb9f3","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{elementId}}","key":"elementId"}]}},"response":[],"_postman_id":"705c79bc-7b88-40a6-b52b-67b4ef9bf4b7"},{"name":"element Clear","event":[{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"4eab6eac-476a-4bdf-8eeb-1f9c9ffa55c3"}}],"id":"1460349f-e1fd-4052-8cc7-1c83429e2567","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:9515/session/:sessionId/element/:elementId/clear","urlObject":{"path":["session",":sessionId","element",":elementId","clear"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"1e03e168-408f-449f-9f82-cbe7fe1d0458","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"},{"id":"be2e8f58-2012-49fb-a728-7600cdef6fa8","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{elementId}}","key":"elementId"}]}},"response":[],"_postman_id":"1460349f-e1fd-4052-8cc7-1c83429e2567"},{"name":"get Title","event":[{"listen":"test","script":{"exec":[""],"type":"text/javascript","id":"9730a1ce-dfce-4875-868a-31b37cffa0df"}},{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"109ed375-56f5-4a4c-9c1c-c5f0b2b9279f"}}],"id":"806e0e06-cfee-43bb-925e-87e3fe8849f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:9515/session/:sessionId/title","urlObject":{"path":["session",":sessionId","title"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"151002d7-7f78-43b5-bb93-c93c8a263618","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"}]}},"response":[],"_postman_id":"806e0e06-cfee-43bb-925e-87e3fe8849f2"},{"name":"close Window","event":[{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"3a33ca21-34e3-47db-98da-51d7f66e108f"}}],"id":"b30eed28-9fae-45cd-ae91-68d2a5a56c8f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:9515/session/:sessionId/window","urlObject":{"path":["session",":sessionId","window"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"16941f49-9dbb-4e3f-a1db-938b0b8b78fd","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"}]}},"response":[],"_postman_id":"b30eed28-9fae-45cd-ae91-68d2a5a56c8f"},{"name":"create Window","event":[{"listen":"prerequest","script":{"exec":["postman.setNextRequest(null)"],"type":"text/javascript","id":"515066cd-bfd0-4eae-9f35-929836f6a63b"}}],"id":"055e4d7d-a00a-4427-ae9f-d3d1fd6253c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"handle\": \"<string>\",\n    \"type\": \"<string>\"\n}"},"url":"http://localhost:9515/session/:sessionId/window/new","urlObject":{"path":["session",":sessionId","window","new"],"host":["http://localhost:9515"],"query":[],"variable":[{"id":"ca83971f-35df-4cb7-ae19-bb64fa9bb6b6","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"{{sessionId}}","key":"sessionId"}]}},"response":[],"_postman_id":"055e4d7d-a00a-4427-ae9f-d3d1fd6253c1"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"242046f1-1592-4aab-8d2c-78f316f0d4a3"}},{"listen":"test","script":{"type":"text/javascript","exec":["if (pm.info.requestName === \"Test steps\") {","    const parse = require('csv-parse/lib/sync')","    //Environmental variable where we copy-pasted the csv content","    const input = pm.variables.get(\"testStep\");","    const records = parse(input, {","        columns: true,","        skip_empty_lines: true","    })","","    pm.variables.set(\"testStepOrder\", records)","} else if (pm.info.requestName.includes(\"get\")) {","    pm.variables.set(pm.variables.get(\"key\"), pm.response.json().value)","    console.warn(pm.info.requestName, pm.variables.get(\"key\"), pm.variables.get(pm.variables.get(\"key\")))","}","","let records = pm.variables.get(\"testStepOrder\");","","let step = records.length ? records.shift() : undefined","","if (step) {","    postman.setNextRequest(step.step)","    pm.variables.set(\"key\", step.key)","    pm.variables.set(\"value\", step.value)","    console.warn(step)","    if (step.step === \"wait\") {","        setTimeout(() => {","            let step = records.shift()","            pm.variables.set(\"key\", step.key)","            pm.variables.set(\"value\", step.value)","            postman.setNextRequest(step.step)","            console.warn(step)","        }, (pm.variables.get(\"key\") === \"seconds\") ? 1000 * step.value : step.value)","    } else if (step.step === \"assert\") {","        console.log(step)","        while (step && step.step === \"assert\") {","            pm.test(`Validate the value of ${pm.variables.get(\"key\")} is ${pm.variables.get(\"value\")}`, function () {","                pm.expect(pm.variables.replaceIn('{{{{key}}}}')).to.be.eql(step.value)","            });","","            step = records.shift()","            if (step) {","                pm.variables.set(\"key\", step.key)","                pm.variables.set(\"value\", step.value)","                postman.setNextRequest(step.step)","            }","        }","","        ","    }","","} else {","    postman.setNextRequest(null)","}","","pm.variables.set(\"testStepOrder\", records)","",""],"id":"6ad6a4ed-1cdf-4666-b9bc-87b3e45bedaf"}}],"variable":[{"key":"baseUrl","value":"http://localhost:9515"}]}