can run playwright in multi-threads
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import configparser
|
||||
import random
|
||||
import string
|
||||
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
@@ -11,7 +13,13 @@ oracle_log_sender = LogSender()
|
||||
# proxy
|
||||
PROXY_SERVER = "http://gw.ntnt.io:5959"
|
||||
PROXY_PASSWORD = "94sY7zwBG13i"
|
||||
SINGLE_PLAYWRIGHT_INSTANCE = sync_playwright().start()
|
||||
|
||||
def get_random_id_number_for_proxy() -> str:
|
||||
S = 8 # number of characters in the string.
|
||||
ran = ''.join(random.choices(string.digits, k=S))
|
||||
id_number = str(ran)
|
||||
print("The randomly generated string is : " + str(ran)) # print the random data
|
||||
return id_number
|
||||
|
||||
DEVICES = ['iPad (gen 6)', 'iPad (gen 6) landscape', 'iPad (gen 7)', 'iPad (gen 7) landscape', 'iPad Mini',
|
||||
'iPad Mini landscape', 'iPad Pro 11', 'iPad Pro 11 landscape', 'iPhone 6', 'iPhone 6 landscape',
|
||||
|
||||
Reference in New Issue
Block a user