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

deleted BidiHandler and browser commands from Element type #11679

Merged
merged 2 commits into from Nov 18, 2023

Conversation

udarrr
Copy link
Member

@udarrr udarrr commented Nov 17, 2023

as a part of the pr #11636

@udarrr
Copy link
Member Author

udarrr commented Nov 17, 2023

Oh it seems there are a lot of references... Are we convinced we'd like to exclude browser commands from element? @christian-bromann

@christian-bromann
Copy link
Member

christian-bromann commented Nov 17, 2023

Are we convinced we'd like to exclude browser commands from element?

Yes, I don't expect anyone to use it because it would throw an error at runtime. The build shows one error caused by:

if (!(scope as WebdriverIO.Element).elementId) {
return scope.execute(selector as any, referenceId)
}

I suggest the following change:

-     if (!(scope as WebdriverIO.Element).elementId) {
+     if (!('elementId' in scope)) {
        return scope.execute(selector as any, referenceId)
    }

Note: if a core package fails to compile you usually get a ton of other TS errors as well since it won't be able to access types of that core package.

@udarrr
Copy link
Member Author

udarrr commented Nov 18, 2023

Note: if a core package fails to compile you usually get a ton of other TS errors as well since it won't be able to access types of that core package.

Yes there was just one place where it should be changed. Thank you for the explanation. It worth to know!

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Thanks a lot!

@christian-bromann christian-bromann added the PR: Polish 💅 PRs that contain improvements on existing features label Nov 18, 2023
@christian-bromann christian-bromann merged commit c1406b7 into main Nov 18, 2023
8 checks passed
@christian-bromann christian-bromann deleted the browser_type_in_element branch November 18, 2023 17:38
jan-molak added a commit to serenity-js/serenity-js that referenced this pull request Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Polish 💅 PRs that contain improvements on existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants