helpers.d.ts 768 B

123456789101112
  1. /**
  2. * Helpers for defining commands more quickly.
  3. *
  4. * In this file we define some helpers for quickly defining commands with either do nothing,
  5. * set/get a value on the session, or return a constant value.
  6. */
  7. import { Command } from 'selenium-mock';
  8. import { Session } from '../interfaces';
  9. export declare function noopFactory(path: string, method?: 'GET' | 'POST' | 'DELETE' | 'PUT'): Command<Session>;
  10. export declare function getterFactory(path: string, name?: string, method?: 'GET' | 'POST' | 'DELETE' | 'PUT'): Command<Session>;
  11. export declare function setterFactory(path: string, name?: string, paramName?: string): Command<Session>;
  12. export declare function constFactory(method: 'GET' | 'POST' | 'DELETE' | 'PUT', path: string, val: any): Command<Session>;