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.

webdriverio.d.ts 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /// <reference types="webdriverio/webdriverio-core"/>
  2. declare namespace WebdriverIO {
  3. function remote(
  4. options?: RemoteOptions,
  5. modifier?: (...args: any[]) => any
  6. ): Promise<BrowserObject>;
  7. function attach(
  8. options: WebDriver.AttachSessionOptions,
  9. ): BrowserObject;
  10. function multiremote(
  11. options: MultiRemoteOptions,
  12. config?: { automationProtocol?: string }
  13. ): Promise<MultiRemoteBrowserObject>;
  14. interface Browser {
  15. strategies: Map<string, () => WebDriver.ElementReference | WebDriver.ElementReference[]>
  16. __propertiesObject__: Record<string, PropertyDescriptor>
  17. puppeteer?: any
  18. /**
  19. * execute any async action within your test spec
  20. */
  21. call: <T>(callback: (...args: any[]) => Promise<T>) => Promise<T>;
  22. /**
  23. * Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.
  24. * The executed script is assumed to be synchronous and the result of evaluating the script is returned to
  25. * the client.
  26. */
  27. execute: {
  28. <T, U extends any[], V extends U>(script: string | ((...arguments: V) => T), ...arguments: U): Promise<T>;
  29. // This overload can be removed when typescript supports partial generics inference: https://github.com/microsoft/TypeScript/issues/26242
  30. <T>(script: string | ((...arguments: any[]) => T), ...arguments: any[]): Promise<T>;
  31. };
  32. // there is no way to add callback as last parameter after `...args`.
  33. // https://github.com/Microsoft/TypeScript/issues/1360
  34. // executeAsync: <T>(script: string | ((...arguments: any[], callback: (result: T) => void) => void), ...arguments: any[]) => Promise<T>;
  35. /**
  36. * Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.
  37. * The executed script is assumed to be asynchronous and must signal that is done by invoking
  38. * the provided callback, which is always provided as the final argument to the function. The value
  39. * to this callback will be returned to the client.
  40. */
  41. executeAsync: <U extends any[], V extends U>(script: string | ((...arguments: V) => void), ...arguments: U) => Promise<any>;
  42. }
  43. interface BrowserObject extends WebDriver.ClientOptions, WebDriver.ClientAsync, Browser {
  44. }
  45. interface MultiRemoteBrowser extends WebDriver.ClientOptions, WebDriver.ClientAsync, Browser {
  46. }
  47. /**
  48. * Error to be thrown when a severe error was encountered when a Service is being ran.
  49. */
  50. class SevereServiceError extends Error { }
  51. }
  52. declare var browser: WebdriverIO.BrowserObject | WebdriverIO.MultiRemoteBrowserObject;
  53. declare var driver: WebdriverIO.BrowserObject | WebdriverIO.MultiRemoteBrowserObject;
  54. /**
  55. * internal flags
  56. */
  57. declare var _HAS_FIBER_CONTEXT: boolean
  58. /**
  59. * find a single element on the page.
  60. */
  61. declare var $: (selector: string | Function) => Promise<WebdriverIO.Element>;
  62. /**
  63. * find multiple elements on the page.
  64. */
  65. declare var $$: (selector: string | Function) => Promise<WebdriverIO.ElementArray>;
  66. declare module "webdriverio" {
  67. export = WebdriverIO
  68. }