Skip to content
Discussion options

You must be logged in to vote

You have to use parameterized to pass in multiple args. (In your case, different websites.)

(pytest.parametrize doesn't work with unittest.TestCase inheritance.)

Here's an example of parameterized for multiple proxies:

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

class ProxyTests(BaseCase):
    @parameterized.expand(
        [
            ["host1:port1"],
            ["host2:port2"],
            ["host3:port3"],
        ]
    )
    def test_multiple_proxies(self, proxy_string):
        self.get_new_driver(
            undetectable=True, proxy=proxy_string, multi_proxy=True
        )
        self.driver.get("https://bro…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@suredarv06
Comment options

@mdmintz
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants