source: trip-planner-front/node_modules/@angular/cdk/testing/selenium-webdriver/selenium-web-driver-element.d.ts@ 6fe77af

Last change on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 4.4 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { ElementDimensions, EventData, ModifierKeys, TestElement, TestKey, TextOptions } from '@angular/cdk/testing';
9import * as webdriver from 'selenium-webdriver';
10/** A `TestElement` implementation for WebDriver. */
11export declare class SeleniumWebDriverElement implements TestElement {
12 readonly element: () => webdriver.WebElement;
13 private _stabilize;
14 constructor(element: () => webdriver.WebElement, _stabilize: () => Promise<void>);
15 /** Blur the element. */
16 blur(): Promise<void>;
17 /** Clear the element's input (for input and textarea elements only). */
18 clear(): Promise<void>;
19 /**
20 * Click the element at the default location for the current environment. If you need to guarantee
21 * the element is clicked at a specific location, consider using `click('center')` or
22 * `click(x, y)` instead.
23 */
24 click(modifiers?: ModifierKeys): Promise<void>;
25 /** Click the element at the element's center. */
26 click(location: 'center', modifiers?: ModifierKeys): Promise<void>;
27 /**
28 * Click the element at the specified coordinates relative to the top-left of the element.
29 * @param relativeX Coordinate within the element, along the X-axis at which to click.
30 * @param relativeY Coordinate within the element, along the Y-axis at which to click.
31 * @param modifiers Modifier keys held while clicking
32 */
33 click(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;
34 /**
35 * Right clicks on the element at the specified coordinates relative to the top-left of it.
36 * @param relativeX Coordinate within the element, along the X-axis at which to click.
37 * @param relativeY Coordinate within the element, along the Y-axis at which to click.
38 * @param modifiers Modifier keys held while clicking
39 */
40 rightClick(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise<void>;
41 /** Focus the element. */
42 focus(): Promise<void>;
43 /** Get the computed value of the given CSS property for the element. */
44 getCssValue(property: string): Promise<string>;
45 /** Hovers the mouse over the element. */
46 hover(): Promise<void>;
47 /** Moves the mouse away from the element. */
48 mouseAway(): Promise<void>;
49 /**
50 * Sends the given string to the input as a series of key presses. Also fires input events
51 * and attempts to add the string to the Element's value.
52 */
53 sendKeys(...keys: (string | TestKey)[]): Promise<void>;
54 /**
55 * Sends the given string to the input as a series of key presses. Also fires input events
56 * and attempts to add the string to the Element's value.
57 */
58 sendKeys(modifiers: ModifierKeys, ...keys: (string | TestKey)[]): Promise<void>;
59 /**
60 * Gets the text from the element.
61 * @param options Options that affect what text is included.
62 */
63 text(options?: TextOptions): Promise<string>;
64 /** Gets the value for the given attribute from the element. */
65 getAttribute(name: string): Promise<string | null>;
66 /** Checks whether the element has the given class. */
67 hasClass(name: string): Promise<boolean>;
68 /** Gets the dimensions of the element. */
69 getDimensions(): Promise<ElementDimensions>;
70 /** Gets the value of a property of an element. */
71 getProperty<T = any>(name: string): Promise<T>;
72 /** Sets the value of a property of an input. */
73 setInputValue(newValue: string): Promise<void>;
74 /** Selects the options at the specified indexes inside of a native `select` element. */
75 selectOptions(...optionIndexes: number[]): Promise<void>;
76 /** Checks whether this element matches the given selector. */
77 matchesSelector(selector: string): Promise<boolean>;
78 /** Checks whether the element is focused. */
79 isFocused(): Promise<boolean>;
80 /**
81 * Dispatches an event with a particular name.
82 * @param name Name of the event to be dispatched.
83 */
84 dispatchEvent(name: string, data?: Record<string, EventData>): Promise<void>;
85 /** Gets the webdriver action sequence. */
86 private _actions;
87 /** Executes a function in the browser. */
88 private _executeScript;
89 /** Dispatches all the events that are part of a click event sequence. */
90 private _dispatchClickEventSequence;
91}
Note: See TracBrowser for help on using the repository browser.