Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 36 additions & 33 deletions packages/extension/understudy/deepLocator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,50 +129,50 @@ export class DeepLocatorDelegate {
}

// Locator API delegates
async click(options?: { button?: MouseButton; clickCount?: number }) {
return (await this.real()).click(options);
async click(options?: { button?: MouseButton; clickCount?: number }, progress?: Progress) {
return (await this.real(progress)).click(options, progress);
}
async count() {
return (await this.real()).count();
async count(progress?: Progress) {
return (await this.real(progress)).count(progress);
}
async hover() {
return (await this.real()).hover();
async hover(progress?: Progress) {
return (await this.real(progress)).hover(progress);
}
async fill(value: string) {
return (await this.real()).fill(value);
}
async type(text: string, options?: { delay?: number }) {
return (await this.real()).type(text, options);
}
async selectOption(values: string | string[]) {
return (await this.real()).selectOption(values);
async selectOption(values: string | string[], progress?: Progress) {
return (await this.real(progress)).selectOption(values, progress);
}
async scrollTo(percent: number | string) {
return (await this.real()).scrollTo(percent);
async scrollTo(percent: number | string, progress?: Progress) {
return (await this.real(progress)).scrollTo(percent, progress);
}
async isVisible() {
return (await this.real()).isVisible();
async isVisible(progress?: Progress) {
return (await this.real(progress)).isVisible(progress);
}
async isChecked() {
return (await this.real()).isChecked();
async isChecked(progress?: Progress) {
return (await this.real(progress)).isChecked(progress);
}
async inputValue() {
return (await this.real()).inputValue();
async inputValue(progress?: Progress) {
return (await this.real(progress)).inputValue(progress);
}
async textContent() {
return (await this.real()).textContent();
async textContent(progress?: Progress) {
return (await this.real(progress)).textContent(progress);
}
async innerHtml() {
return (await this.real()).innerHtml();
async innerHtml(progress?: Progress) {
return (await this.real(progress)).innerHtml(progress);
}
async innerText() {
return (await this.real()).innerText();
async innerText(progress?: Progress) {
return (await this.real(progress)).innerText(progress);
}
async centroid() {
return (await this.real()).centroid();
async centroid(progress?: Progress) {
return (await this.real(progress)).centroid(progress);
}
async backendNodeId() {
return (await this.real()).backendNodeId();
async backendNodeId(progress?: Progress) {
return (await this.real(progress)).backendNodeId(progress);
}
async highlight(options?: {
durationMs?: number;
Expand All @@ -181,13 +181,16 @@ export class DeepLocatorDelegate {
}) {
return (await this.real()).highlight(options);
}
async sendClickEvent(options?: {
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
detail?: number;
}) {
return (await this.real()).sendClickEvent(options);
async sendClickEvent(
options?: {
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
detail?: number;
},
progress?: Progress,
) {
return (await this.real(progress)).sendClickEvent(options, progress);
}
async setInputFiles(files: SetInputFilesArgument) {
return (await this.real()).setInputFiles(files);
Expand Down
47 changes: 25 additions & 22 deletions packages/extension/understudy/frameLocator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,44 +123,47 @@ class LocatorDelegate {
}

// Locator API delegates
async click(options?: { button?: "left" | "right" | "middle"; clickCount?: number }) {
return (await this.real()).click(options);
async click(
options?: { button?: "left" | "right" | "middle"; clickCount?: number },
progress?: Progress,
) {
return (await this.real(progress)).click(options, progress);
}
async hover() {
return (await this.real()).hover();
async hover(progress?: Progress) {
return (await this.real(progress)).hover(progress);
}
async fill(value: string) {
return (await this.real()).fill(value);
}
async type(text: string, options?: { delay?: number }) {
return (await this.real()).type(text, options);
}
async selectOption(values: string | string[]) {
return (await this.real()).selectOption(values);
async selectOption(values: string | string[], progress?: Progress) {
return (await this.real(progress)).selectOption(values, progress);
}
async scrollTo(percent: number | string) {
return (await this.real()).scrollTo(percent);
async scrollTo(percent: number | string, progress?: Progress) {
return (await this.real(progress)).scrollTo(percent, progress);
}
async isVisible() {
return (await this.real()).isVisible();
async isVisible(progress?: Progress) {
return (await this.real(progress)).isVisible(progress);
}
async isChecked() {
return (await this.real()).isChecked();
async isChecked(progress?: Progress) {
return (await this.real(progress)).isChecked(progress);
}
async inputValue() {
return (await this.real()).inputValue();
async inputValue(progress?: Progress) {
return (await this.real(progress)).inputValue(progress);
}
async textContent() {
return (await this.real()).textContent();
async textContent(progress?: Progress) {
return (await this.real(progress)).textContent(progress);
}
async innerHtml() {
return (await this.real()).innerHtml();
async innerHtml(progress?: Progress) {
return (await this.real(progress)).innerHtml(progress);
}
async innerText() {
return (await this.real()).innerText();
async innerText(progress?: Progress) {
return (await this.real(progress)).innerText(progress);
}
async count() {
return (await this.real()).count();
async count(progress?: Progress) {
return (await this.real(progress)).count(progress);
}
first(): LocatorDelegate {
return this.nth(0);
Expand Down
Loading
Loading