seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
4.67k stars 929 forks source link

The "--variables=DICTIONARY" option only works for the first test that runs #1691

Closed mdmintz closed 1 year ago

mdmintz commented 1 year ago

The --variables=DICTIONARY option only works for the first test that runs

Minimal reproducible example:

Running pytest --variables="{'abc':123}" on:

from parameterized import parameterized
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)

class Tests(BaseCase):
    @parameterized.expand(
        [[],[],[]]
    )
    def test_parameterized(self):
        self._print(self.variables)

Output:

{'abc': 123}
{}
{}
mdmintz commented 1 year ago

Fixed in 4.11.8 - https://github.com/seleniumbase/SeleniumBase/releases/tag/v4.11.8