def test_01(self): """ 步骤: 1、美购首页 2、品类聚合 3、搜索框 4、点击热词 :return: """ begin_date = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') print(begin_date) testbuild = TodolistBuild(self.driver) testbuild. click_alert() testbuild.click_meigou() time.sleep(5) testbuild.click_czsl() testbuild.click_search() time.sleep(2) testbuild.click_hot_search() time.sleep(5) self.driver.background_app(5) time.sleep(5) # 美购搜索 埋点 result = mysql_test.query(action='search_result_open', event_time=begin_date) assert result != ' ', 'search_result_open事件为空!'
def test_01(self): """ 步骤: 1、打开搜索结果页 2、下拉刷新一次,退出搜索结果页 3、首页浏览事件记一次 :return: """ begin_date = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') print(begin_date) testbuild = TodolistBuild(self.driver) testbuild.click_alert() testbuild.click_meigou() time.sleep(5) testbuild.click_search() time.sleep(2) testbuild.switch_android_up() time.sleep(5) self.driver.background_app(5) time.sleep(5)