def Person_archivement_help(self): print('点击左上角头像,进入宝贝成就页面') self.find_element(*self.person_achivement).click() print('点击右上角帮助') po = Operation(self.driver) po.clickDot(999, 145) print('查看帮助提示成功!')
def Click_touch_again(self): self.Click_touch() print('等待加载时间') time.sleep(8) print('再次点击,进行飞行!') po = Operation(self.driver) print('点击凯叔小光头') po.clickDot(536, 849) print('等待加载时间') time.sleep(5) List = [ self.find_element(*self.star1_icon), self.find_element(*self.star2_icon), self.find_element(*self.star3_icon), self.find_element(*self.star4_icon), self.find_element(*self.star5_icon), self.find_element(*self.star6_icon) ] x = random.randint(0, len(List)) print('xxxx-------', x) print('随机选择一个星球收听') List[x].click() time.sleep(3) print('点击关闭收听') List[x].click() print('关闭成功!') self.find_element(*self.back_icon).click() print('返回成功')
def Click_touch_back(self): time.sleep(3) print('点击首页右上角-摸一摸按钮') self.find_element(*self.touch_icon).click() #等待小光头渲染完成,否则会造成定位失败 time.sleep(2) po = Operation(self.driver) print('点击凯叔小光头') po.clickDot(526, 1250) time.sleep(5) print('点击成功!') self.find_element(*self.back_icon).click() print('返回成功')
def Click_touch(self): time.sleep(3) print(self.driver.page_source) print('点击首页右上角-摸一摸按钮') self.find_element(*self.touch_icon).click() #等待小光头渲染完成,否则会造成定位失败 time.sleep(2) print('点击凯叔小光头') po = Operation(self.driver) #判断凯叔光头是否存在 if po.Element(*self.guang_tou): po.clickDot(526, 1104) print('操作成功') time.sleep(5) #判断是否进入星球页面 if po.Element(*self.star1_icon): print('进入星球页面成功!') time.sleep(2) else: print('进入星球页面失败') raise LocateError