-
Notifications
You must be signed in to change notification settings - Fork 1.4k
multiple driver test
#1047
-
Hi,
i am looking for an option to run more than one driver per test. my scenario includes interaction between 2 and more users (drivers), what will be the best way to implement this requirement?
thank you
Tal
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
mdmintz
Nov 2, 2021
Hi @tallevy22 , you can use these methods for that:
self.get_new_driver( browser=None, headless=None, locale_code=None, protocol=None, servername=None, port=None, proxy=None, agent=None, switch_to=True, cap_file=None, cap_string=None, disable_csp=None, enable_ws=None, enable_sync=None, use_auto_ext=None, no_sandbox=None, disable_gpu=None, incognito=None, guest_mode=None, devtools=None, remote_debug=None, swiftshader=None, block_images=None, chromium_arg=None, firefox_arg=None, firefox_pref=None, user_data_dir=None, extension_zip=None, extension_dir=None, is_mobile=None, d_width=None, d_height=None, d_p_r=None) self.switch_to_driver(driver) self.switch...
Replies: 1 comment
-
Hi @tallevy22 , you can use these methods for that:
self.get_new_driver( browser=None, headless=None, locale_code=None, protocol=None, servername=None, port=None, proxy=None, agent=None, switch_to=True, cap_file=None, cap_string=None, disable_csp=None, enable_ws=None, enable_sync=None, use_auto_ext=None, no_sandbox=None, disable_gpu=None, incognito=None, guest_mode=None, devtools=None, remote_debug=None, swiftshader=None, block_images=None, chromium_arg=None, firefox_arg=None, firefox_pref=None, user_data_dir=None, extension_zip=None, extension_dir=None, is_mobile=None, d_width=None, d_height=None, d_p_r=None) self.switch_to_driver(driver) self.switch_to_default_driver()
Example usage:
driver2 = self.get_new_driver() # open a second driver browser self.open(URL) # will be opened in driver2 self.switch_to_default_driver() # back on the first driver self.open(URL) # will be opened in the first driver self.switch_to_driver(driver2) # back on the second driver
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
0 replies
Answer selected by
mdmintz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment