def setUpClass(cls): """初始化""" # <--------------zalenium cls.dr = webdriver.Remote( command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities={'browserName': 'chrome'}) # zalenium --------------> # cls.dr = webdriver.Chrome() # <--------------------------------非 zalenium # options = webdriver.ChromeOptions() # options.add_argument('--disable-extensions') # # 隐藏 GUI # # options.add_argument('--headless') # options.add_argument('--disable-gpu') # options.add_argument('--no-sandbox') # cls.dr = webdriver.Chrome(executable_path='/usr/bin/chromedriver', chrome_options=options) # 非 zalenium--------------------------------- > cls.dr.maximize_window() cls.page = UserSignIn_Page(cls.dr) # MBG 注册 demo 用户 cls.page.get('https://trust.mbgmarkets.me/cn/register-demo.htm') # 时间戳,用于注册用户名拼接 cls.time_now = str(datetime.datetime.now().strftime('%y%m%d%H%M'))
def setUpClass(cls): """初始化""" cls.dr = webdriver.Chrome() cls.dr.maximize_window() cls.page = UserSignIn_Page(cls.dr) # au2 cls.page.get('https://awstau-trust.aetos.me/12013192-C05') # 时间戳,用于注册用户名拼接 cls.time_now = str(datetime.datetime.now().strftime('%m%d%H%M'))
def setUpClass(cls): """初始化""" # cls.dr = webdriver.Chrome() # <--------------------------------后加的 options = webdriver.ChromeOptions() options.add_argument('--disable-extensions') # 隐藏 GUI # options.add_argument('--headless') options.add_argument('--disable-gpu') options.add_argument('--no-sandbox') cls.dr = webdriver.Chrome(executable_path='/usr/bin/chromedriver', chrome_options=options) # 后加的--------------------------------- > cls.dr.maximize_window() cls.page = UserSignIn_Page(cls.dr) # au 注册 demo 用户 cls.page.get('https://awstau-trust.aetos.me/cn/register-demo.htm')
def setUpClass(cls): """初始化""" # cls.dr = webdriver.Chrome() # <--------------------------------后加的 options = webdriver.ChromeOptions() options.add_argument('--disable-extensions') # 隐藏 GUI # options.add_argument('--headless') options.add_argument('--disable-gpu') options.add_argument('--no-sandbox') cls.dr = webdriver.Chrome(executable_path='/usr/bin/chromedriver', chrome_options=options) # 后加的--------------------------------- > cls.dr.maximize_window() cls.page = UserSignIn_Page(cls.dr) # MBG 直客注册 live 用户 cls.page.get('https://trust.mbgmarkets.me/cn/register-live.htm') # 时间戳,用于注册用户名拼接 cls.time_now = str(datetime.datetime.now().strftime('%y%m%d%H%M'))
def setUpClass(cls): """初始化""" # cls.dr = webdriver.Chrome() # <--------------------------------后加的 options = webdriver.ChromeOptions() options.add_argument('--disable-extensions') # 隐藏 GUI # options.add_argument('--headless') options.add_argument('--disable-gpu') options.add_argument('--no-sandbox') cls.dr = webdriver.Chrome(executable_path='/usr/bin/chromedriver', chrome_options=options) # 后加的--------------------------------- > cls.dr.maximize_window() cls.page = UserSignIn_Page(cls.dr) # au cls.page.get('https://awstau-trust.aetos.me/12013192-C05') # 时间戳,用于注册用户名拼接 cls.time_now = str(datetime.datetime.now().strftime('%m%d%H%M'))
def setUpClass(cls): """初始化""" # cls.dr = webdriver.Chrome() # <--------------------------------后加的 options = webdriver.ChromeOptions() options.add_argument('--disable-extensions') # 隐藏 GUI # options.add_argument('--headless') options.add_argument('--disable-gpu') options.add_argument('--no-sandbox') cls.dr = webdriver.Chrome(executable_path='/usr/bin/chromedriver', chrome_options=options) # 后加的--------------------------------- > cls.dr.maximize_window() cls.page = UserSignIn_Page(cls.dr) # IB 开户链接注册 # cls.page.get('https://awstau-trust.aetos.me/12013130-C05') # cls.page.get('http://awst49.aetosbiz.com/12073447-C05') # new cls.page.get('https://awst49-trust.aetos.me')
def setUpClass(cls): """初始化""" # cls.dr = webdriver.Chrome() # <--------------------------------后加的 options = webdriver.ChromeOptions() options.add_argument('--disable-extensions') # 隐藏 GUI # options.add_argument('--headless') options.add_argument('--disable-gpu') options.add_argument('--no-sandbox') cls.dr = webdriver.Chrome(executable_path='/usr/bin/chromedriver', chrome_options=options) # 后加的--------------------------------- > cls.dr.maximize_window() cls.page = UserSignIn_Page(cls.dr) # MBG # cls.page.get('http://awst49.aetosbiz.com/12073452-C05') # 春燕的 IB 开户链接 #cls.page.get('http://awst49.aetosbiz.com/12073453-C05') # MBG 测试 cls.page.get('http://my-mbg.com/12073473-C05') # 时间戳,用于注册用户名拼接 cls.time_now = str(datetime.datetime.now().strftime('%m%d%H%M'))
def setUpClass(cls): """初始化""" # cls.dr = webdriver.Chrome() # <--------------------------------后加的 options = webdriver.ChromeOptions() # 禁用 chrome 扩展 options.add_argument('--disable-extensions') # 隐藏 GUI # options.add_argument('--headless') # 禁用 chrome GPU 硬件加速 options.add_argument('--disable-gpu') # 让 chrome 以 root 权限运行 options.add_argument('--no-sandbox') cls.dr = webdriver.Chrome(executable_path='/usr/bin/chromedriver', chrome_options=options) # 后加的--------------------------------- > cls.dr.maximize_window() cls.page = UserSignIn_Page(cls.dr) # MBG 注册 demo 用户 cls.page.get('https://trust.mbgmarkets.me/cn/register-demo.htm') # 时间戳,用于注册用户名拼接 cls.time_now = str(datetime.datetime.now().strftime('%y%m%d%H%M')) # 正确的用户名 cls.true_username = '******' + cls.time_now + '@email.com'