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

chore: remove unused cookies code #1508

Merged
merged 1 commit into from
Feb 26, 2023
Merged

chore: remove unused cookies code #1508

merged 1 commit into from
Feb 26, 2023

Conversation

KazuCocoa
Copy link
Member

In #1484 (comment), I noticed https://github.com/appium/appium-xcuitest-driver/blob/master/lib/commands/cookies.js had getCookies, deleteCookie and _deleteCookie via remote-debugger's WebInspector code instead of JS script right now.

So it probably would be nice to remove the unused methods in web.js.

I checked in a real device, so not in a simulator yet. I'll do a double-check with a simulator later if the current mater uses which code.

throw new errors.UnknownError(`Error parsing cookies from result: '${jsCookies}'`);
}
};

commands.setCookie = async function setCookie (cookie) {
Copy link
Contributor

Choose a reason for hiding this comment

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

it also makes sense to move this helper to cookies.js module

Copy link
Contributor

Choose a reason for hiding this comment

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

it would also be interesting to know if the remote debugger has some helpers to set cookies

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, probably can. I found https://github.com/WebKit/WebKit/blob/main/Source/JavaScriptCore/inspector/protocol/Page.json#L191-L196, so am thinking to play something later

Copy link
Member Author

Choose a reason for hiding this comment

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

as another pr

@KazuCocoa KazuCocoa merged commit 1f5e2c4 into master Feb 26, 2023
@KazuCocoa KazuCocoa deleted the cookies-duplications branch February 26, 2023 07:08
@KazuCocoa
Copy link
Member Author

cc @boneskull as cookies stuff's update

github-actions bot pushed a commit that referenced this pull request Feb 26, 2023
## [4.18.2](v4.18.1...v4.18.2) (2023-02-26)

### Miscellaneous Chores

* remove unused cookies code ([#1508](#1508)) ([1f5e2c4](1f5e2c4))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 4.18.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants