source: trip-planner-front/node_modules/@angular/cdk/testing/protractor/protractor-element.d.ts@ ceaed42

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

initial commit

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