本人代码:
def by_power(self):
//下拉按钮XPATH
power_status_loc="html/body/div[1]/div[1]/div/form/ul/li[4]/span/span/a"
//下拉菜单XPATH
power_option_loc="html/body/div[5]/div"
power_option1_loc = "html/body/div[5]/div/div[1]"
power_option2_loc = "html/body/div[5]/div/div[2]"
power_option3_loc = "html/body/div[5]/div/div[3]"
list=[power_option1_loc,power_option2_loc,power_option3_loc]
i=random.choice(list)
self.find_element_by_xpath(power_status_loc).click()
sleep(5)
# WebDriverWait(driver,20).until(ES.visibility_of_element_located((By.XPATH,power_option_loc)))
# WebDriverWait(driver,20).until(ES.visibility_of_element_located((By.ID,"_easyui_combobox_i1_1")))
self.find_element_by_xpath(i).click()
请大神帮忙解决下,本人是初学者,这个问题困扰好几天,始终无法解决