How to apply the Pool selenium to seleniumbase #1719
-
Hi, I have the following multiprocessing Pool code
How seleniumbase can be applied to the same environment, especially with As a beginner, need some clarifications, Any help would be appreciated..Thanks.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use parameterization for repetitive actions. Eg: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/parameterized_test.py In your case, the test would look like this: import random
from parameterized import parameterized
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__, "-n=5")
class ParameterizedTests(BaseCase):
@parameterized.expand(
[
["https://wordpress.com/create-website/"],
["https://www.tumblr.com/register?source=login_register_header_mobile"],
["https://squareup.com/signup"],
["https://en.over-blog.com/"],
["https://issuu.com/signup?plan=free"],
]
)
def test_parameterized_navigation(self, url):
self.open(url)
self.sleep(random.randint(3,6)) Then run it like this: pytest -n=5 SeleniumBase automatically downloads drivers that you need based on the version of the browser that you have installed. |
Beta Was this translation helpful? Give feedback.
You can use parameterization for repetitive actions. Eg: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/parameterized_test.py
In your case, the test would look like this: