Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix types for dragAndDrop command in new Elem API. #4329

Merged
merged 3 commits into from
Dec 18, 2024
Merged
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions types/web-element.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,13 @@ export type ScopedElementRect = {
readonly height: number;
};

export type DragAndDropDestination = {
export type DragAndDropDestination =
{
readonly xOffset: number;
readonly yOffset: number;
};
}
|{readonly x: number; readonly y: number;}
|WebElement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShreySinha02 You're on the right track here but we do not need to include both the coordinates and WebElement here. You can add | WebElement directly in the type definition of dragAndDrop(). And perhaps change the above type to DragAndDropDestinationCoordinates?


export interface ElementFunction
extends Pick<
Expand Down
Loading