Skip to content

Commit

Permalink
deleted BidiHandler and browser commands from Element type (#11679)
Browse files Browse the repository at this point in the history
* deleted BidiHandler and browser commands  from Element type

* changed condition in fetchElementByJSFunction
  • Loading branch information
udarrr committed Nov 18, 2023
1 parent 6e4fbb8 commit c1406b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/webdriverio/src/types.ts
Expand Up @@ -286,7 +286,7 @@ export interface ElementBase extends InstanceBase, ElementReference, CustomInsta
/**
* @deprecated use `WebdriverIO.Element` instead
*/
export interface Element extends ElementBase, BidiHandler, ProtocolCommands, Omit<BrowserCommandsType, keyof ElementCommandsType>, ElementCommandsType {}
export interface Element extends ElementBase, ProtocolCommands, ElementCommandsType {}

interface MultiRemoteBase extends Omit<InstanceBase, 'sessionId'>, CustomInstanceCommands<WebdriverIO.MultiRemoteBrowser> {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/webdriverio/src/utils/index.ts
Expand Up @@ -198,7 +198,7 @@ function fetchElementByJSFunction (
scope: WebdriverIO.Browser | WebdriverIO.Element,
referenceId?: string
): Promise<ElementReference | ElementReference[]> {
if (!(scope as WebdriverIO.Element).elementId) {
if (!('elementId' in scope)) {
return scope.execute(selector as any, referenceId)
}
/**
Expand Down

0 comments on commit c1406b7

Please sign in to comment.