Saving and loading cookies for a future test case #1234
-
Hello Sir, I'm kinda new to automation. and I love how fast seleniumbase is and it's rich features. So, i have this piece of code that i learn from your documentation & discussion that I think I'm stuck right now :D
I've also tried with the Could you please explain to me what did i do wrong, or how i am supposed to do with the code to achieve my goal? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Instead of doing that, run import pytest
from seleniumbase import BaseCase
class MyTests(BaseCase):
@pytest.mark.run(order=1)
def test_aaa(self):
... While reusing a session with |
Beta Was this translation helpful? Give feedback.
Instead of doing that, run
pytest
using--reuse-session
(or--rs
), and have only your first test perform the login. You can mark a test to go first by adding@pytest.mark.run(order=1)
:While reusing a session with
--reuse-session
, all tests will run in the same browser window.