Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. DevTools
  2. ========
  3. > A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using [Puppeteer](https://www.npmjs.com/package/puppeteer)
  4. This 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.
  5. ## Install
  6. ```sh
  7. $ npm i webdriverio
  8. ```
  9. ## Example
  10. The following example demonstrates how WebdriverIO can be used with the `devtools` package as automation binding using the [`automationProtocol`](https://webdriver.io/docs/options.html#automationProtocol) option:
  11. ```js
  12. const { remote } = require('webdriverio')
  13. let browser;
  14. (async () => {
  15. browser = await remote({
  16. automationProtocol: 'devtools',
  17. capabilities: {
  18. browserName: 'chrome'
  19. }
  20. })
  21. await browser.url('https://webdriver.io')
  22. /**
  23. * run Puppeteer code
  24. */
  25. await browser.call(async () => {
  26. const page = (await browser.puppeteer.pages())[0]
  27. await page.setRequestInterception(true)
  28. page.on('request', interceptedRequest => {
  29. if (interceptedRequest.url().endsWith('webdriverio.png')) {
  30. return interceptedRequest.continue({
  31. url: 'https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png'
  32. })
  33. }
  34. interceptedRequest.continue()
  35. })
  36. })
  37. // continue with WebDriver commands
  38. await browser.refresh()
  39. await browser.pause(2000)
  40. /**
  41. * now on the https://webdriver.io page you see the Puppeteer logo
  42. * instead of the WebdriverIO one
  43. */
  44. await browser.deleteSession()
  45. })().catch(async (e) => {
  46. console.error(e)
  47. await browser.deleteSession()
  48. })
  49. ```
  50. ### Commands
  51. The following commands are already supported:
  52. - [x] [newSession](https://w3c.github.io/webdriver/#new-session)
  53. - [x] [deleteSession](https://w3c.github.io/webdriver/#delete-session)
  54. - [x] [status](https://w3c.github.io/webdriver/#status)
  55. - [x] [getTimeouts](https://w3c.github.io/webdriver/#get-timeouts)
  56. - [x] [setTimeouts](https://w3c.github.io/webdriver/#set-timeouts)
  57. - [x] [getUrl](https://w3c.github.io/webdriver/#get-current-url)
  58. - [x] [navigateTo](https://w3c.github.io/webdriver/#navigate-to)
  59. - [x] [back](https://w3c.github.io/webdriver/#back)
  60. - [x] [forward](https://w3c.github.io/webdriver/#forward)
  61. - [x] [refresh](https://w3c.github.io/webdriver/#refresh)
  62. - [x] [getTitle](https://w3c.github.io/webdriver/#get-title)
  63. - [x] [getWindowHandle](https://w3c.github.io/webdriver/#get-window-handle)
  64. - [x] [closeWindow](https://w3c.github.io/webdriver/#close-window)
  65. - [x] [switchToWindow](https://w3c.github.io/webdriver/#switch-to-window)
  66. - [x] [createWindow](https://w3c.github.io/webdriver/#new-window)
  67. - [x] [getWindowHandles](https://w3c.github.io/webdriver/#get-window-handles)
  68. - [x] [switchToFrame](https://w3c.github.io/webdriver/#switch-to-frame)
  69. - [x] [switchToParentFrame](https://w3c.github.io/webdriver/#switch-to-parent-frame)
  70. - [x] [getWindowRect](https://w3c.github.io/webdriver/#get-window-rect)
  71. - [x] [setWindowRect](https://w3c.github.io/webdriver/#set-window-rect)
  72. - [ ] [maximizeWindow](https://w3c.github.io/webdriver/#maximize-window) (not possible with Puppeteer)
  73. - [ ] [minimizeWindow](https://w3c.github.io/webdriver/#minimize-window) (not possible with Puppeteer)
  74. - [ ] [fullscreenWindow](https://w3c.github.io/webdriver/#fullscreen-window) (not possible with Puppeteer)
  75. - [x] [findElement](https://w3c.github.io/webdriver/#find-element)
  76. - [x] [findElements](https://w3c.github.io/webdriver/#find-elements)
  77. - [x] [findElementFromElement](https://w3c.github.io/webdriver/#find-element-from-element)
  78. - [x] [findElementsFromElement](https://w3c.github.io/webdriver/#find-elements-from-element)
  79. - [x] [getActiveElement](https://w3c.github.io/webdriver/#get-active-element)
  80. - [x] [isElementSelected](https://w3c.github.io/webdriver/#is-element-selected)
  81. - [x] [isElementDisplayed](https://w3c.github.io/webdriver/#element-displayedness)
  82. - [x] [getElementAttribute](https://w3c.github.io/webdriver/#get-element-attribute)
  83. - [x] [getElementProperty](https://w3c.github.io/webdriver/#get-element-property)
  84. - [x] [getElementCSSValue](https://w3c.github.io/webdriver/#get-element-css-value)
  85. - [x] [getElementText](https://w3c.github.io/webdriver/#get-element-text)
  86. - [x] [getElementTagName](https://w3c.github.io/webdriver/#get-element-tag-name)
  87. - [x] [getElementRect](https://w3c.github.io/webdriver/#get-element-rect)
  88. - [x] [isElementEnabled](https://w3c.github.io/webdriver/#is-element-enabled)
  89. - [x] [elementClick](https://w3c.github.io/webdriver/#element-click)
  90. - [x] [elementClear](https://w3c.github.io/webdriver/#element-clear)
  91. - [x] [elementSendKeys](https://w3c.github.io/webdriver/#element-send-keys)
  92. - [x] [getPageSource](https://w3c.github.io/webdriver/#get-page-source)
  93. - [x] [executeScript](https://w3c.github.io/webdriver/#execute-script)
  94. - [x] [executeAsyncScript](https://w3c.github.io/webdriver/#execute-async-script)
  95. - [x] [getAllCookies](https://w3c.github.io/webdriver/#get-all-cookies)
  96. - [x] [getNamedCookie](https://w3c.github.io/webdriver/#get-named-cookie)
  97. - [x] [addCookie](https://w3c.github.io/webdriver/#add-cookie)
  98. - [x] [deleteAllCookies](https://w3c.github.io/webdriver/#delete-all-cookies)
  99. - [x] [deleteCookie](https://w3c.github.io/webdriver/#delete-cookie)
  100. - [x] [performActions](https://w3c.github.io/webdriver/#perform-actions)
  101. - [x] [releaseActions](https://w3c.github.io/webdriver/#release-actions)
  102. - [x] [dismissAlert](https://w3c.github.io/webdriver/#dismiss-alert)
  103. - [x] [acceptAlert](https://w3c.github.io/webdriver/#accept-alert)
  104. - [x] [getAlertText](https://w3c.github.io/webdriver/#get-alert-text)
  105. - [x] [sendAlertText](https://w3c.github.io/webdriver/#send-alert-text)
  106. - [x] [takeScreenshot](https://w3c.github.io/webdriver/#take-screenshot)
  107. - [x] [takeElementScreenshot](https://w3c.github.io/webdriver/#take-element-screenshot)
  108. ### Selector Strategies
  109. - [x] [CSS Selector](https://w3c.github.io/webdriver/#css-selectors)
  110. - [x] [Link Text](https://w3c.github.io/webdriver/#partial-link-text)
  111. - [x] [Partial Link Text](https://w3c.github.io/webdriver/#partial-link-text)
  112. - [x] [Tag Name](https://w3c.github.io/webdriver/#tag-name)
  113. - [x] [XPath](https://w3c.github.io/webdriver/#xpath)
  114. ### Browser
  115. - [x] Chrome
  116. - [x] Firefox (nightly only)
  117. - [x] Edge
  118. - [ ] Safari