{"name":"devtools","version":"8.0.0-alpha.558","keywords":["devtoolsdriver"],"author":{"name":"Christian Bromann","email":"mail@bromann.dev"},"license":"MIT","_id":"devtools@8.0.0-alpha.558","homepage":"https://github.com/webdriverio/webdriverio/tree/main/packages/devtools","bugs":{"url":"https://github.com/webdriverio/webdriverio/issues"},"dist":{"shasum":"eee38c2662a1bb794fe208caa8f7a3edb372f12e","tarball":"http://registry-npm.ywwl.com/devtools/download/devtools-8.0.0-alpha.558.tgz","fileCount":256,"integrity":"sha512-RksE1cvnB3+0laPmPIW8FwHxS5fJTLghzPmVCE2B9oUS76mRGjb0tlKgi0vpMzSnGAJu7oC52nbng9ztNHI1oA==","signatures":[{"sig":"MEYCIQDSdX10LqIVXXepBNHBaUIpL10THLm18fGV4iH9RwhesgIhAIvhRc5X71cQJel1dYmPbqsFi8i7And9wL6WSKo+pUCZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdE5wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmokbQ//crGnMg56DdNI9DzJuWB6a4D9lM4X0gEIgbmEAuaSlw6US/qj\r\n8zbGhyG3yruGDuAYV3VtF2KkLYqBfZ///46EnGDkEHCpJmSn/Y2mvtN+qx2T\r\n6aZDzHT4xkhBwL+9C5UU/lIeOBz6LLPdXM1UPmLePPjpSr/vecxT201CCFLF\r\n1vtGkisEA44yXToAuY3JlWCWSTx9aeVVJkXcWBWdaCXFx5OEHHbs1ZtkfZl8\r\nQ3d6J8+BQYH5FeOU/9S8+kXVJmAuQBg3tikX4rjBqBXG8WImsM0AwyEQzXUJ\r\nrUk8y642dTJWuhn985cvO+TQf2rruCIXhJu2vKtAUX3Lcxe8QE0Dy5HLNBmD\r\nTMevU5/XzAB8KxSjeCushXrHGyLDlMRF/zbDWVjZTOzJwQBzx0I2JnCvBE80\r\nWfxJKx+9gQQv1Zs+SIJRQyph2jiiebudRd+lHQSBzprtI5SHmgmw/SQ48g1P\r\nnHaRLHd6YJsAE5vjMGbq2rxbEaw//WqthHfvSFkupsCEJetDrLFqtJNjgKDP\r\n9NafwgU/iw5mtolN1SIaTAPHvwUzJ0UHpxmGzIRI/FXuQ9CQRQjaZsDtWx1G\r\nxge5uUua+Kh2tgKWKXRmX342wfgj2XYTTGwfJG4QYpAkipQEdq97gAmv8hlj\r\ncqWlzLx06noNSeFvJej2vRw5BWx9S5J4MlA=\r\n=p9m3\r\n-----END PGP SIGNATURE-----\r\n","size":56839,"noattachment":false,"key":"/devtools/-/devtools-8.0.0-alpha.558.tgz"},"main":"./build/cjs/index.js","type":"module","types":"./build/index.d.ts","module":"./build/index.js","engines":{"node":"^16.13 || >=18"},"exports":{".":[{"import":"./build/index.js","require":"./build/cjs/index.js"},"./build/cjs/index.js"]},"gitHead":"9156ec0f422b7e784ea148e569fe423ba21a0355","_npmUser":{"name":"wdio-user","email":"christian+webdriverio@saucelabs.com"},"repository":{"url":"git://github.com/webdriverio/webdriverio.git","type":"git","directory":"packages/devtools"},"_npmVersion":"lerna/6.0.3/node@v18.12.0+x64 (linux)","description":"A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer","directories":{},"_nodeVersion":"18.12.0","dependencies":{"uuid":"^9.0.0","which":"^3.0.0","edge-paths":"^2.1.0","@wdio/types":"8.0.0-alpha.558+9156ec0f4","@wdio/utils":"8.0.0-alpha.558+9156ec0f4","@wdio/config":"8.0.0-alpha.558+9156ec0f4","@wdio/logger":"8.0.0-alpha.558+9156ec0f4","ua-parser-js":"^1.0.1","puppeteer-core":"19.2.2","@wdio/protocols":"8.0.0-alpha.558+9156ec0f4","chrome-launcher":"^0.15.0","@types/ua-parser-js":"^0.7.33","query-selector-shadow-dom":"^1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/node":"^18.0.0","@types/uuid":"^8.3.0"},"typeScriptVersion":"3.8.3","_npmOperationalInternal":{"tmp":"tmp/devtools_8.0.0-alpha.558_1668566640671_0.6326225040847395","host":"s3://npm-registry-packages"},"readme":"> [!WARNING]\n> ***WebdriverIO is deprecating the use of Chrome Devtools as automation protocol through a WebDriver like interface. Instead, you can use the [`getPuppeteer`](/docs/api/browser/getPuppeteer) command to get ahold of a Puppeteer instance for Chrome Devtools introspection and automation.***\n\nDevTools\n========\n\n> A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using [Puppeteer](https://www.npmjs.com/package/puppeteer)\n\nThis package provides a low level interface to run browser automation scripts based on the WebDriver protocol. If you are looking for a tool to automate Chrome or Firefox you should look up [Puppeteer](https://www.npmjs.com/package/puppeteer). This is suppose to be used by the [WebdriverIO](https://webdriver.io/) package in order to run its automation on the Chrome DevTools protocol.\n\n## Install\n\n```sh\nnpm i webdriverio\n```\n\n## Example\n\nThe following example demonstrates how WebdriverIO can be used with the `devtools` package as automation binding using the [`automationProtocol`](https://webdriver.io/docs/options#automationProtocol) option:\n\n```js\nimport { remote } from 'webdriverio'\n\nconst browser = await remote({\n    automationProtocol: 'devtools',\n    capabilities: {\n        browserName: 'chrome',\n        'wdio:devtoolsOptions': {\n            headless: true\n        }\n    }\n})\n\nawait browser.url('https://webdriver.io')\n\n/**\n * run Puppeteer code\n */\nconst puppeteer = await browser.getPuppeteer()\nconst page = (await puppeteer.pages())[0]\nawait page.setRequestInterception(true)\npage.on('request', interceptedRequest => {\n    if (interceptedRequest.url().endsWith('webdriverio.png')) {\n        return interceptedRequest.continue({\n            url: 'https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png'\n        })\n    }\n\n    interceptedRequest.continue()\n})\n\n// continue with WebDriver commands\nawait browser.url('https://v6.webdriver.io')\nawait browser.pause(2000)\n\n/**\n * now on the https://v6.webdriver.io page you see the Puppeteer logo\n * instead of the WebdriverIO one\n */\n\nawait browser.deleteSession()\n```\n\n## `wdio:devtoolsOptions` Capability\n\nIn order to set [Puppeteer specific configurations](https://pptr.dev/#?product=Puppeteer&version=v5.5.0&show=api-puppeteerlaunchoptions) you can use the `wdio:devtoolsOptions` capability which is a custom property (compliant to the WebDriver protocol), e.g.:\n\n```js\n{\n    browserName: 'chrome',\n    'wdio:devtoolsOptions': {\n        headless: true,\n        defaultViewport: {\n            width: 800,\n            height: 600,\n            deviceScaleFactor: 1,\n            isMobile: false\n        }\n    }\n}\n```\n\n### Commands\n\nThe following commands are already supported:\n\n- [x] [newSession](https://w3c.github.io/webdriver/#new-session)\n- [x] [deleteSession](https://w3c.github.io/webdriver/#delete-session)\n- [x] [status](https://w3c.github.io/webdriver/#status)\n- [x] [getTimeouts](https://w3c.github.io/webdriver/#get-timeouts)\n- [x] [setTimeouts](https://w3c.github.io/webdriver/#set-timeouts)\n- [x] [getUrl](https://w3c.github.io/webdriver/#get-current-url)\n- [x] [navigateTo](https://w3c.github.io/webdriver/#navigate-to)\n- [x] [back](https://w3c.github.io/webdriver/#back)\n- [x] [forward](https://w3c.github.io/webdriver/#forward)\n- [x] [refresh](https://w3c.github.io/webdriver/#refresh)\n- [x] [getTitle](https://w3c.github.io/webdriver/#get-title)\n- [x] [getWindowHandle](https://w3c.github.io/webdriver/#get-window-handle)\n- [x] [closeWindow](https://w3c.github.io/webdriver/#close-window)\n- [x] [switchToWindow](https://w3c.github.io/webdriver/#switch-to-window)\n- [x] [createWindow](https://w3c.github.io/webdriver/#new-window)\n- [x] [getWindowHandles](https://w3c.github.io/webdriver/#get-window-handles)\n- [x] [switchToFrame](https://w3c.github.io/webdriver/#switch-to-frame)\n- [x] [switchToParentFrame](https://w3c.github.io/webdriver/#switch-to-parent-frame)\n- [x] [getWindowRect](https://w3c.github.io/webdriver/#get-window-rect)\n- [x] [setWindowRect](https://w3c.github.io/webdriver/#set-window-rect)\n- [ ] [maximizeWindow](https://w3c.github.io/webdriver/#maximize-window) (not possible with Puppeteer)\n- [ ] [minimizeWindow](https://w3c.github.io/webdriver/#minimize-window) (not possible with Puppeteer)\n- [ ] [fullscreenWindow](https://w3c.github.io/webdriver/#fullscreen-window) (not possible with Puppeteer)\n- [x] [findElement](https://w3c.github.io/webdriver/#find-element)\n- [x] [findElements](https://w3c.github.io/webdriver/#find-elements)\n- [x] [findElementFromElement](https://w3c.github.io/webdriver/#find-element-from-element)\n- [x] [findElementsFromElement](https://w3c.github.io/webdriver/#find-elements-from-element)\n- [x] [getActiveElement](https://w3c.github.io/webdriver/#get-active-element)\n- [x] [isElementSelected](https://w3c.github.io/webdriver/#is-element-selected)\n- [x] [isElementDisplayed](https://w3c.github.io/webdriver/#element-displayedness)\n- [x] [getElementAttribute](https://w3c.github.io/webdriver/#get-element-attribute)\n- [x] [getElementProperty](https://w3c.github.io/webdriver/#get-element-property)\n- [x] [getElementCSSValue](https://w3c.github.io/webdriver/#get-element-css-value)\n- [x] [getElementText](https://w3c.github.io/webdriver/#get-element-text)\n- [x] [getElementTagName](https://w3c.github.io/webdriver/#get-element-tag-name)\n- [x] [getElementRect](https://w3c.github.io/webdriver/#get-element-rect)\n- [x] [isElementEnabled](https://w3c.github.io/webdriver/#is-element-enabled)\n- [x] [elementClick](https://w3c.github.io/webdriver/#element-click)\n- [x] [elementClear](https://w3c.github.io/webdriver/#element-clear)\n- [x] [elementSendKeys](https://w3c.github.io/webdriver/#element-send-keys)\n- [x] [getPageSource](https://w3c.github.io/webdriver/#get-page-source)\n- [x] [executeScript](https://w3c.github.io/webdriver/#execute-script)\n- [x] [executeAsyncScript](https://w3c.github.io/webdriver/#execute-async-script)\n- [x] [getAllCookies](https://w3c.github.io/webdriver/#get-all-cookies)\n- [x] [getNamedCookie](https://w3c.github.io/webdriver/#get-named-cookie)\n- [x] [addCookie](https://w3c.github.io/webdriver/#add-cookie)\n- [x] [deleteAllCookies](https://w3c.github.io/webdriver/#delete-all-cookies)\n- [x] [deleteCookie](https://w3c.github.io/webdriver/#delete-cookie)\n- [x] [performActions](https://w3c.github.io/webdriver/#perform-actions)\n- [x] [releaseActions](https://w3c.github.io/webdriver/#release-actions)\n- [x] [dismissAlert](https://w3c.github.io/webdriver/#dismiss-alert)\n- [x] [acceptAlert](https://w3c.github.io/webdriver/#accept-alert)\n- [x] [getAlertText](https://w3c.github.io/webdriver/#get-alert-text)\n- [x] [sendAlertText](https://w3c.github.io/webdriver/#send-alert-text)\n- [x] [takeScreenshot](https://w3c.github.io/webdriver/#take-screenshot)\n- [x] [takeElementScreenshot](https://w3c.github.io/webdriver/#take-element-screenshot)\n\n### Selector Strategies\n\n- [x] [CSS Selector](https://w3c.github.io/webdriver/#css-selectors)\n- [x] [Link Text](https://w3c.github.io/webdriver/#partial-link-text)\n- [x] [Partial Link Text](https://w3c.github.io/webdriver/#partial-link-text)\n- [x] [Tag Name](https://w3c.github.io/webdriver/#tag-name)\n- [x] [XPath](https://w3c.github.io/webdriver/#xpath)\n\n### Browser\n\n- [x] Chrome\n- [x] Firefox (nightly only)\n- [x] Edge\n- [ ] Safari\n","publish_time":1668566640848,"maintainers":[{"name":"christian-bromann","email":"mail@bromann.dev"},{"name":"wdio-user","email":"bot@webdriver.io"},{"name":"wswebcreation-nl","email":"wim@wswebcreation.nl"}],"_cnpm_publish_time":1668566640848,"dist-tags":{"beta":"7.0.0-beta.4","latest":"8.42.0","latest-5":"5.23.0","next":"8.26.1-alpha.1","v7":"7.40.0","v8":"8.46.0"}}