Comments (3)
If you save cookies using sb.save_cookies("cookies.txt")
, you might get a file that looks something like this in ./saved_cookies/cookies.txt
:
[{"domain": "www.saucedemo.com", "expiry": 1712082307, "httpOnly": false, "name": "session-username", "path": "/", "sameSite": "Lax", "secure": false, "value": "standard_user"}]
If you run:
sb.open("https://www.saucedemo.com")
sb.load_cookies("cookies.txt")
sb.open("https://www.saucedemo.com/inventory.html")
then you have bypassed the need to login because you already loaded the login cookie.
If you need to need to modify the cookies before loading them, that's just Python file-IO, and that isn't a SeleniumBase-specific question anymore. Lots of resources online, such as on Stack Overflow. However, I may add a method in the next release for getting the cookies from that file without loading them into the browser right away. Could simplify a few things.
from seleniumbase.
I added more cookie methods in 4.25.1
- https://github.com/seleniumbase/SeleniumBase/releases/tag/v4.25.1
from seleniumbase.
Hi Michael,
I can't wait for the new feature for adding cookies separately. After some searching, I think my question is about data wrangling not just for cookies and I can solve it by myself.
from seleniumbase.
Related Issues (20)
- Not able to run on ARM based Ubuntu HOT 1
- Excessive CPU and RAM usage HOT 3
- Highlight all element from sb.find_visible_elements() using for loop HOT 6
- Improvements to highlighting elements HOT 1
- Not able to Login on ticketmaster HOT 3
- Slow opening Chrome (1 minute) on Ubuntu headless HOT 9
- Interrupting the recorder from outside the terminal HOT 1
- How to bypass reCAPTCHA HOT 4
- Add argument to Chromium with Driver class HOT 1
- When using ThreadPoolExecutor, a minor problem occurs. HOT 1
- Can the nodejs code in the integrations/nodejs directory be automatically generated? HOT 1
- How can i click the element, not using selector HOT 1
- Update examples to use the newer CF Turnstile selector
- Add `driver.uc_open_with_disconnect(url)` HOT 1
- Add the `--ee` option for regular tests and Recorder mode HOT 1
- How to change fonts in Seleniumbase Presenter? HOT 4
- Fetch Requests Data When Open a Page HOT 1
- --use-file-for-fake-audio-capture doesn't working HOT 1
- Can't launch in Google Colab HOT 3
- seleniumbase uc with proxy on ubuntu (linux) problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seleniumbase.