Skip to content

Add storage_state and set_storage_state to PlaywrightEx.BrowserContext#35

Merged
ftes merged 2 commits intoftes:mainfrom
probably-not:add-new-storage-functions-to-context
Apr 20, 2026
Merged

Add storage_state and set_storage_state to PlaywrightEx.BrowserContext#35
ftes merged 2 commits intoftes:mainfrom
probably-not:add-new-storage-functions-to-context

Conversation

@probably-not
Copy link
Copy Markdown
Contributor

This adds two functions: storage_state and set_storage_state to the PlaywrightEx.BrowserContext. These functions can be used to directly affect the entire context's storage state, including cookies, IndexedDB, and LocalStorage, without the need to evaluate JS on the context.

I followed the patterns that I saw in the cookies and add_cookies functions here, hope that works!

@probably-not probably-not marked this pull request as draft April 6, 2026 11:17
@probably-not probably-not marked this pull request as ready for review April 6, 2026 11:26
Copy link
Copy Markdown
Owner

@ftes ftes left a comment

Choose a reason for hiding this comment

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

Wonderful. Do you think path would be helpful? Probably don't need it yet.

Comment thread lib/playwright_ex/channels/browser_context.ex
@ftes ftes enabled auto-merge (squash) April 20, 2026 08:25
auto-merge was automatically disabled April 20, 2026 10:09

Head branch was pushed to by a user without write access

@probably-not probably-not force-pushed the add-new-storage-functions-to-context branch from df40219 to 621e533 Compare April 20, 2026 10:09
@probably-not
Copy link
Copy Markdown
Contributor Author

Ah looks like the same thing happened here as well... I'll take care of it.

@probably-not probably-not force-pushed the add-new-storage-functions-to-context branch from 621e533 to d02dce0 Compare April 20, 2026 10:17
@probably-not
Copy link
Copy Markdown
Contributor Author

Fixed here as well! Should be good to go 🙏

@ftes ftes enabled auto-merge (squash) April 20, 2026 12:57
@ftes ftes merged commit bcb5b16 into ftes:main Apr 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants