|
25 | 25 | -D port=PORT (The Selenium Grid port used by the test server.) |
26 | 26 | -D cap-file=FILE (The web browser's desired capabilities to use.) |
27 | 27 | -D cap-string=STRING (The web browser's desired capabilities to use.) |
28 | | --D proxy=SERVER:PORT (Connect to a proxy server:port for tests.) |
29 | | --D proxy=USERNAME:PASSWORD@SERVER:PORT (Use authenticated proxy server.) |
| 28 | +-D proxy=SERVER:PORT (Connect to a proxy server:port as tests are running) |
| 29 | +-D proxy=USERNAME:PASSWORD@SERVER:PORT (Use an authenticated proxy server) |
30 | 30 | -D proxy-bypass-list=STRING (";"-separated hosts to bypass, Eg "*.foo.com") |
31 | 31 | -D proxy-pac-url=URL (Connect to a proxy server using a PAC_URL.pac file.) |
32 | 32 | -D proxy-pac-url=USERNAME:PASSWORD@URL (Authenticated proxy with PAC URL.) |
| 33 | +-D multi-proxy (Allow multiple authenticated proxies when multi-threaded.) |
33 | 34 | -D agent=STRING (Modify the web browser's User-Agent string.) |
34 | 35 | -D mobile (Use the mobile device emulator while running tests.) |
35 | 36 | -D metrics=STRING (Set mobile metrics: "CSSWidth,CSSHeight,PixelRatio".) |
@@ -223,6 +224,7 @@ def get_configured_sb(context): |
223 | 224 | sb.proxy_string = None |
224 | 225 | sb.proxy_bypass_list = None |
225 | 226 | sb.proxy_pac_url = None |
| 227 | + sb.multi_proxy = False |
226 | 228 | sb.enable_3d_apis = False |
227 | 229 | sb.swiftshader = False |
228 | 230 | sb.ad_block_on = False |
@@ -746,6 +748,10 @@ def get_configured_sb(context): |
746 | 748 | proxy_pac_url = sb.proxy_pac_url # revert to default |
747 | 749 | sb.proxy_pac_url = proxy_pac_url |
748 | 750 | continue |
| 751 | + # Handle: -D multi-proxy / multi_proxy |
| 752 | + if low_key in ["multi-proxy", "multi_proxy"]: |
| 753 | + sb.multi_proxy = True |
| 754 | + continue |
749 | 755 | # Handle: -D enable-3d-apis / enable_3d_apis |
750 | 756 | if low_key in ["enable-3d-apis", "enable_3d_apis"]: |
751 | 757 | sb.enable_3d_apis = True |
@@ -1121,7 +1127,8 @@ def _perform_behave_unconfigure_(): |
1121 | 1127 | from seleniumbase.core import log_helper |
1122 | 1128 | from seleniumbase.core import proxy_helper |
1123 | 1129 |
|
1124 | | - proxy_helper.remove_proxy_zip_if_present() |
| 1130 | + if hasattr(sb_config, "multi_proxy") and not sb_config.multi_proxy: |
| 1131 | + proxy_helper.remove_proxy_zip_if_present() |
1125 | 1132 | if hasattr(sb_config, "reuse_session") and sb_config.reuse_session: |
1126 | 1133 | # Close the shared browser session |
1127 | 1134 | if sb_config.shared_driver: |
|
0 commit comments