{"_id":"@astraload/asl-webdriver","_rev":"9-3cbe3e17aa61bb37b9d2cc5e1ae9301a","name":"@astraload/asl-webdriver","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.2":{"name":"@astraload/asl-webdriver","version":"1.0.2","keywords":["astraload","webdriver"],"author":{"name":"baryshok"},"license":"ISC","_id":"@astraload/asl-webdriver@1.0.2","maintainers":[{"name":"eluck","email":"mail@eluck.me"},{"name":"baryshok","email":"baryshok@gmail.com"}],"homepage":"https://github.com/astraload/asl-webdriver#readme","bugs":{"url":"https://github.com/astraload/asl-webdriver/issues"},"dist":{"shasum":"187d4e80428c16ac7fe65f977a1558d5e15b8bf5","tarball":"https://registry.npmjs.org/@astraload/asl-webdriver/-/asl-webdriver-1.0.2.tgz","fileCount":3,"integrity":"sha512-EWVdfVtpZ96nxiqtg3i3egNANNGnSnuOhcX+sXfgO3F+5uoSiODl3atBHEM/93jlWxU1hGXlDRn5E3TIlB4I0w==","signatures":[{"sig":"MEUCIB3aL4Fs9hm/oGQvEDKCnqqvPTe4pujDkBUA2QDTMDttAiEAipn0DDFz/XorriricWwqtpoY/77GEjAOFJNJsHhG6CI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnArwCRA9TVsSAnZWagAAGgkQAKLBIspXKSlgPkmItfhc\npMITY7QzSCqcG+YLmCSpt+hLX1erF4s9cQCZxUqFYenJu0dfCcrPngd/x5k4\nSmbV0loeyLpZav3r2CiBjkJ4ZO7ntdOzII24+GqLpqFKjy48Ho1CSRfwGqES\nFCSKA6efPv/rhE75tYrpAWCxpyt03PS1vw1kJH+DvYRWMwW6sCwJFWEtaO+r\nuIpdxHNnw2cPhpUFVj2W7PFcUWAqy8AkEIlGeExFsSlMRzJhoF/iHFc3RK8a\n0ubxvTXVPSnKDNFbb50LiVP3MaXOCRCP+sdk3THLFQkLJNSRqVTNzKLFjNiW\nqSkBJ/AdgII8OduXdVtHClMCIUcRWSAa08EXx7JBBflEzXVkWbgdwPBRcZqQ\nf9S80bspFq2d49b12jA1z5rOvqnI2i4+1qMyY43veSaN9gmExsM5uf7cFrbT\nWlZJRo3Jh/S6jTmurZMGdMavfggx+74s55yAiEnqx0BbHc+ymgGlk6wTv55O\nUBiUDuBg6zTe7Pm4f/Gykv/D8HC55QmAqP63tZ/HRzqth79PS67jU1j8wiHr\nbwvAwZkaAmmjDbisXeDKLGc10u4blHU2he7J/EKPhVfUCdqtvRS1ebZKzpkx\n8acRmWMkFwPwkDxte7k/Pdb/7DXDD7QWAvf8pIgDnlwMegSm3+PHtWLJnMwm\nISOV\r\n=WD7S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"e5b6c637da1edf65e6f03f366c51267d6156314c","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"baryshok","email":"baryshok@gmail.com"},"repository":{"url":"git+https://github.com/astraload/asl-webdriver.git","type":"git"},"_npmVersion":"6.13.4","description":"A custom Selenium-webdriver dedicated to being used with Astraload SaaS","directories":{},"_nodeVersion":"12.16.1","dependencies":{"babel-polyfill":"6.26.0","selenium-webdriver":"3.6.0","chrome-remote-interface":"0.28.2"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/asl-webdriver_1.0.2_1604061936166_0.1980023805241291","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@astraload/asl-webdriver","version":"1.0.3","keywords":["astraload","webdriver"],"author":{"name":"baryshok"},"license":"ISC","_id":"@astraload/asl-webdriver@1.0.3","maintainers":[{"name":"baryshok","email":"baryshok@gmail.com"},{"name":"eluck","email":"mail@eluck.me"}],"homepage":"https://github.com/astraload/asl-webdriver#readme","bugs":{"url":"https://github.com/astraload/asl-webdriver/issues"},"dist":{"shasum":"ef2d199dbdfb0ea047e5c01e6ef1ab8d7d87d4bd","tarball":"https://registry.npmjs.org/@astraload/asl-webdriver/-/asl-webdriver-1.0.3.tgz","fileCount":3,"integrity":"sha512-0dKaThZBnqCIqsUO8os+qNyAwgNOFNgKARl3t3xrSsMy+4XfX0FReZBWyIr/nXxxbcxjujExD7RhdEIGSqdQLA==","signatures":[{"sig":"MEYCIQCSEHU4jrjgUBVxBd6B/ypXnzc/8+Z0tEOv20/MasUsewIhALi9GCFNY7M58TD5Vni40ZC64dOqZi+7jIiEssc9lZMc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29031,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5B0ACRA9TVsSAnZWagAAKDsP/2eAYWKD85GHdbOG0iLa\nz8RfliRI/15WXN4h074Ay0XqWVjPUOl4C3CPkH+uycrAoPR3dqSjUrMDW+j7\nmOVkUy6OanCLQ5P6a51HEiVr+KuESmmkKLLaZ9rwBxK8julP0u8eRLdCikod\n/Xc4OrhhPT097uUhzemo7ZGxHecfvpYRzmgRVJFZ5WwONBI7TE+rfEi2Dvbt\nHdSkTq25CYOpDt7iKTL71EAQnYdnnqtPL83h01CHNxDkFGH2ftQE/EBDrFaL\n3Yn+FVMMhk/sHuTJvClqkJsNWsaQkHtuHfjwol0gr8M6NQKyZgsBipDnlfSB\nRrngWoyeoGSTncsJEhf1b2/x5woY+n4+9FfJSmVd7cHQEXpLOMJSbIPj4fvP\nhiCL0uNW7Ggk700NHr8sQaYlrVfVrlhH481EkQDqQsY9qlvAqvxIJUw0kQwk\nzJ4clbf+VxWhkEYlUcz7vk1ngyWcF5/CsoQrC3JqdKB8wWziVuvHeZA7YZYS\nWKCiNVGzASAQhJeBw+TEQVyqtFvEFIv5kQYIbYA89BrPKTi/X125VPNZ2mPW\nIKgDuxl1V8fPSxEDVToGOJM6j5kNSPW4Hi0fp1ol3DDmzDSfU4LZwTF1Dx0r\nLwvzU6U/f1OL6jOgg4++60IPEWI60OAHSsqojaMG8Vs+gsrdB9MUtVNtKuNl\n+MnE\r\n=IY6n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"6d9798f7820ce8788a6049e8a903abc57297d44e","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"baryshok","email":"baryshok@gmail.com"},"repository":{"url":"git+https://github.com/astraload/asl-webdriver.git","type":"git"},"_npmVersion":"6.14.12","description":"A custom Selenium-webdriver dedicated to being used with Astraload SaaS","directories":{},"_nodeVersion":"12.22.1","dependencies":{"babel-polyfill":"6.26.0","selenium-webdriver":"3.6.0","chrome-remote-interface":"0.31.0"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/asl-webdriver_1.0.3_1625562367927_0.7734850433332832","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@astraload/asl-webdriver","version":"1.0.4","keywords":["astraload","webdriver"],"author":{"name":"baryshok"},"license":"ISC","_id":"@astraload/asl-webdriver@1.0.4","maintainers":[{"name":"baryshok","email":"baryshok@gmail.com"},{"name":"eluck","email":"mail@eluck.me"}],"homepage":"https://github.com/astraload/asl-webdriver#readme","bugs":{"url":"https://github.com/astraload/asl-webdriver/issues"},"dist":{"shasum":"dbb49495fc90113c639c206406b1dbfc5df6f215","tarball":"https://registry.npmjs.org/@astraload/asl-webdriver/-/asl-webdriver-1.0.4.tgz","fileCount":3,"integrity":"sha512-hIpDB+/16qG8G0aYndEk9qAyVI93mS05+pxh/4NY+HgM27xYLSvQE3yanvCagubpcbZGNDX3b2ImAukWwUdnzg==","signatures":[{"sig":"MEUCIG2/tpJPENeGj26XGz/Gm78blV5G7bdBF85lzi7XW5QYAiEAjlUd4OJRyoxj3DfcieZQmFC1N8TEwHT/mJuK4keW5g8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29031},"main":"index.js","gitHead":"c8f99eae0f9a4f8b5f7ed3bf95990b03d920199d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"baryshok","email":"baryshok@gmail.com"},"repository":{"url":"git+https://github.com/astraload/asl-webdriver.git","type":"git"},"_npmVersion":"6.14.18","description":"A custom Selenium-webdriver dedicated to being used with Astraload SaaS","directories":{},"_nodeVersion":"14.21.3","dependencies":{"babel-polyfill":"6.26.0","selenium-webdriver":"3.6.0","chrome-remote-interface":"0.33.2"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/asl-webdriver_1.0.4_1735254922982_0.7031947957659141","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@astraload/asl-webdriver","version":"1.0.5","description":"A custom Selenium-webdriver dedicated to being used with Astraload SaaS","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/astraload/asl-webdriver.git"},"keywords":["astraload","webdriver"],"author":{"name":"baryshok"},"license":"ISC","bugs":{"url":"https://github.com/astraload/asl-webdriver/issues"},"homepage":"https://github.com/astraload/asl-webdriver#readme","dependencies":{"babel-polyfill":"6.26.0","chrome-remote-interface":"0.33.2","selenium-webdriver":"3.6.0"},"devDependencies":{},"_id":"@astraload/asl-webdriver@1.0.5","gitHead":"853e6a3d119ad7c1d49ca448894a70d7880e8f37","_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Wi6CNsKYI8T4xVRfE4oduSIWkn5udAk7L34aq9fXd8TM2EfzAjXCVE1HbgofGxy2mPlHYhw3xyQViBReTW52dg==","shasum":"99e1f38afed2dcf788ef20aca751ca000b793325","tarball":"https://registry.npmjs.org/@astraload/asl-webdriver/-/asl-webdriver-1.0.5.tgz","fileCount":3,"unpackedSize":29062,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBq5f41MXRIvgmIt7uj8d2jATUazVv6zaVFp2MUZzjraAiEAm1hV9P9CUC4aJYwmgz6pckrRcSls3wesQuXe3Yqgbgk="}]},"_npmUser":{"name":"baryshok","email":"baryshok@gmail.com"},"directories":{},"maintainers":[{"name":"baryshok","email":"baryshok@gmail.com"},{"name":"eluck","email":"mail@eluck.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/asl-webdriver_1.0.5_1747423966436_0.9170710848131793"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-30T12:45:35.936Z","modified":"2025-05-16T19:32:46.804Z","1.0.1":"2020-10-30T12:31:30.498Z","1.0.0":"2020-10-30T12:31:30.498Z","1.0.2":"2020-10-30T12:45:36.321Z","1.0.3":"2021-07-06T09:06:08.049Z","1.0.4":"2024-12-26T23:15:23.152Z","1.0.5":"2025-05-16T19:32:46.604Z"},"bugs":{"url":"https://github.com/astraload/asl-webdriver/issues"},"author":{"name":"baryshok"},"license":"ISC","homepage":"https://github.com/astraload/asl-webdriver#readme","keywords":["astraload","webdriver"],"repository":{"type":"git","url":"git+https://github.com/astraload/asl-webdriver.git"},"description":"A custom Selenium-webdriver dedicated to being used with Astraload SaaS","maintainers":[{"name":"baryshok","email":"baryshok@gmail.com"},{"name":"eluck","email":"mail@eluck.me"}],"readme":"# AslWebDriver\n\nAslWebDriver is a custom Selenium-webdriver dedicated to being used with Astraload SaaS.\n\n## Installation\n\n```sh\nnpm install @astraload/asl-webdriver\n```\n\n## Setup\n\nDownload and place on your system PATH an executable of [chromedriver](http://chromedriver.storage.googleapis.com/index.html) corresponding to a version of the Chrome browser installed on your system.\n\n## API\n\n**constructor(params)**\n\n**params:**\n\n1.  `isHeadless` (`boolean`): Flag whether to run chrome in headless mode. Defaults to `false`. Set to `true` in order to run load test on Astraload SaaS.\n2.  `windowSize` (`{ height (number), width (number)}` _optional_): Browser window size.\n3.  `logLevel` (`number` _optional_): Level of extended logging of network activity. Can be set to `LogLevel.Verbose` and/or `LogLevel.Debug`. `LogLevel.Verbose` flag enables logging of `dataReceived` network events. `LogLevel.Debug` flag enables logging of unfinished network requests. Use Bitwise OR operator to combine both flags.\n\n**Example:**\n\n```\nconst { AslWebDriver } = require('@astraload/asl-webdriver');\n\nconst aslWebDriver = new AslWebDriver({\n  isHeadless: true,\n  windowSize: {\n    widht: 1280,\n    height: 960,\n  },\n  logLevel: AslWebDriver.LogLevel.Verbose | AslWebDriver.LogLevel.Debug,\n});\n\n```\n\n---\n\n**loadBrowser()** / _async_ **loadBrowserAsync()**\n\nMethod takes no parameters. It loads Selenium WebDriver, wraps it for capturing performance data, and returns its instance.\n\n**Example:**\n\nThere are 2 ways to integrate AslWebDriver with your tests, depending on whether you use async/await in your tests or not.\n\n**Using async/await:**\n\n```\nlet driver;\n\n(async function() {\n  try {\n    driver = await aslWebDriver.loadBrowserAsync();\n    await driver.get(url);\n    await driver.wait(until.titleContains('SomeTitle'), timeout);\n    await driver.quit();\n  } catch (error) {\n    await aslWebDriver.handleTestFail(error);\n\n    // you need to call handleTestFail method to let the agent properly handle failed test,\n    // otherwise the agent will considers this test as successfully passed.\n    // handleTestFail method will automatically quit the browser after handling the failed test.\n  }\n})();\n```\n\n**WITHOUT using async/await:**\n\n```\nconst driver = aslWebDriver.loadBrowser();\ndriver.get(url);\ndriver.wait(until.titleContains('SomeTitle'), timeout);\ndriver.quit();\n\n// if error happens during the test execution\n// AslWebDriver will catch it for you, properly handle it\n// and then quit the browser.\n```\n\n---\n\n_async_ **handleTestFail(error)**\n\nMethod takes a single parameter - an `error` object. Method is intended to be used in tests which are written is async/await manner to let agent properly handle failed test. Method automatically closes the browser after handling failed test.\n\n**Example:**\n\n```\n(async function() {\n  try {\n  \t// your test steps\n    // ...\n  } catch (error) {\n    await aslWebDriver.handleTestFail(error);\n  }\n})();\n```\n\n---\n\n**userId** (`number`). Let's say you run a test for _100_ users. In that case, each `aslWebDriver` instance will have its own unique `userId` which is a user index in a range from _0_ to _99_.\n\n**Example:**\n\n```\nconst { AslWebDriver } = require('@astraload/asl-webdriver');\nconst aslWebDriver = new AslWebDriver();\nconst { userId } = AslWebDriver;\n\n```\n\n## Notes\n\nThe `@astraload/asl-webdriver` package mirrors all the exports of the `selenium-webdriver` package; so if you need to import anything from the `selenium-webdriver` package to use in your load test, import it from `@astraload/asl-webdriver` package instead:\n\n```\nconst { AslWebDriver, By, Condition, until } = require(\"@astraload/asl-webdriver\");\n```\n","readmeFilename":"README.md"}