{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"57b57572-1b70-42e0-8362-6ff3bfe71df0","name":"Automate chrome browser","description":"![image](https://d2o2utebsixu4k.cloudfront.net/media/images/410dbe5b-51b1-4b26-98e5-fba4e1f25497.jpg)\n\n\n## Introduction\n\n\nThe 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. \n\nin this collection we just start the chromedriver which starts an api server and exposes all its internal implementation through w3c compliant endpoints\n\nso as a client we just have to call these endpoints to automate the the target (**here chrome browser**). All these selenium, webdriverio standalone etc are just httpclient libraries that calls these endpoints.\n\n## Usage instruction\n\nclick run in postman to open this collection in postman\n\n## short story:\n\n1). Just start chrome driver in cmd (run chromedriver.exe)\n\n![](https://github.com/praveendvd/fileshare/blob/main/chromedriver_start.JPG?raw=true)\n\n**Note:** if you have nodejs you can download chrome driver and start it as simple command as below\n\n```\n>npm install -g chromedriver --detect_chromedriver_version && chromedriver\n```\n\n2). Run the collection in collection runner thats it !!!!!!!!!!!\n\n## Detailed step \n\n\n- 1) use the already available test step flow in the pre-request script section of \"Test steps\" request.\n\n**Note**: You can modify the test step flow in the pre request section of the **\"Test steps\"** request once you are familiar with this collection\n\nthe test cases are in a data table format with step accepts keywords like the **requestname**, **assert** and **wait**. \n\n**key** and **value** are the information we use to drive the test like location strategy , variable to use , value to compare etc\n\n- 2) After defining test just start chromedriver.exe in your command line\n\n- 3)  now run this collection in collection runner or newman\n\n## Theory\n\n## Introduction\n\n\nThe 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. \n\nin 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\n\nso as a client we just have to call these endpoints to automate the the target (**here chrome browser**). All these selenium, webdriverio standalone etc are just httpclient libraries that calls these endpoints.\n\n\n## Let us start by understanding how easy is device Automation:\n\n\nlet's see what is automation is all about\n\n\n## Old implementation:\n\n\nSo 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.\n\n\nso 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)\n\n\nNow 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.\n\n \n\n![old implementation](https://miro.medium.com/max/639/1*zKsLSCjyMmQi2LB7SlzCaQ.png)\n\n\n**An example API:**\n\n\nYes, 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\n\n\n```\n\n\napp.post('/findElement', (req, res) => {\n\n\n// do all complex emplementation on finding element\n\n\nreturn element\n\n\n});\n\n```\n\n\n### Challenge:\n\n\nThe 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\n\n\n### Solution:\n\n\nso 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\n\n\n## New implementation:\n\n\nNow 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\n\n\n\n![enter image description here](https://miro.medium.com/max/630/1*PkVAb1-oVlDMwjUko1Yy3Q.png)\n\n\n  \n\n  \n\n\n### So coming back to what is all this automation about:\n\n\n  \n\n  \n\n\n- 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]\n\n\n- 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","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"8296678","team":1498188,"collectionId":"57b57572-1b70-42e0-8362-6ff3bfe71df0","publishedId":"TzsbKT1V","public":true,"publicUrl":"https://documenter-api.postman.tech/view/8296678/TzsbKT1V","privateUrl":"https://go.postman.co/documentation/8296678-57b57572-1b70-42e0-8362-6ff3bfe71df0","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2021-07-26T20:33:28.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/73926e7128f8c5aa3f8f9bf9b9676fb9deb1a94001a15f08888c4be1fbd782f1","favicon":"https://res.cloudinary.com/postman/image/upload/v1616282766/team/jvdai86wkdwsjks1zaqv.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/TzsbKT1V"}