def gotoSelected(self): zixuan = (By.XPATH, "//*[@text='自选']") self.find( zixuan) # self.driver.find_element(By.XPATH,"//*[@text='自选']") self.find(zixuan).click() return SelectedPage()
def gotoSelected(self): #调用全局的driver对象使用webdriver api定位操纵app zixuan = '自选' self.findByText(zixuan) self.findByText(zixuan).click() return SelectedPage()
def gotoSelected(self): #调用全局的driver对象使用webdriver api操作app # self.driver.find_element(By.xpath,"//*[@text='行情']") zixuan="自选" self.findByText(zixuan) # self.driver.find_element_by_xpath("//*[@text='行情']") self.findByText(zixuan).click() # self.driver.find_element_by_xpath("//*[@text='行情']").click() return SelectedPage()
def gotoSelected(self): # #调用全局的driver对象使用webdriver api操纵app # #self.driver.find_element(By.xpath, "//*[@text='自选']") # zixuan="自选" # self.findByText(zixuan) # #self.driver.find_element_by_xpath("//*[@text='自选']") # self.findByText(zixuan).click() # return SelectedPage() self.load_yaml(MainPage.data_path, "gotoSelected") return SelectedPage()
def gotoSelected(self): #调用全局的driver对象使用webdriver api操纵app AndroidClient.driver.implicitly_wait(100) #self.driver.find_element(By.xpath, "//*[@text='自选']") zixuan=(By.XPATH, "//*[@text='自选']") self.find(zixuan) #self.driver.find_element_by_xpath("//*[@text='自选']") self.find(zixuan).click() return SelectedPage()
def gotoSelected(self): # todo:选择自选页,点击自选按钮 self.driver.implicitly_wait(5) hangqing = (By.XPATH, '//*[contains(@resource-id,"tab_name") and @text="行情"]') self.driver.find(hangqing) self.find(hangqing).click() # self.driver.find_element_by_xpath('//*[contains(@resource-id,"tab_name") and @text="行情"]').click() print("开始休眠10秒钟") sleep(10) return SelectedPage()
def gotoSelected(self): # 调用全局的driver对象使用webdriver api操纵app # self.driver.find_element_by_xpath("//*[@text='自选']") # 第一次改造 # self.driver.find_element(By.XPATH, "//*[@text='自选']") # 第二次改造 # BasePage().find(By.XPATH, "//*[@text='自选']") # 要写成self.find # self.find(By.XPATH, "//*[@text='自选']") # 第三次改造 # zixuan = (By.XPATH, "//*[@text='自选']") # self.find(zixuan) # 第四次改造 zixuan = '自选' # self.driver.find_element_by_xpath("//*[@text='自选']").click() # self.driver.find_element(By.XPATH, "//*[@text='自选']").click() self.findByText(zixuan) self.findByText(zixuan).click() return SelectedPage()
def gotoSelected(self): #调用全局的driver对象使用webdriver api操纵app AndroidClient.driver.find_element_by_xpath("//*[@text='自选']") AndroidClient.driver.find_element_by_xpath("//*[@text='自选']").click() return SelectedPage()