Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

huawei.py : 添加付款选选项 #16

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion huawei.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,18 @@ def __choose_product(self):
print("{0} 开始选择手机规格".format(datetime.now()))
sku_color = self.__config_get("product", "color")
sku_version = self.__config_get("product", "version")
sku_payment = self.__config_get("product", "payment")
WebDriverWait(self.browser, self.defaultTimeout).until(
EC.presence_of_element_located((By.LINK_TEXT, f"{sku_color}"))
).click()
WebDriverWait(self.browser, self.defaultTimeout).until(
EC.presence_of_element_located((By.LINK_TEXT, f"{sku_version}"))
).click()
print("{0} 选择手机规格完成,颜色:{1} 版本:{2}".format(datetime.now(), sku_color, sku_version))
WebDriverWait(self.browser, 20).until(
EC.presence_of_element_located((By.LINK_TEXT, f"{sku_payment}"))
).click()
print("{0} 选择手机规格完成,颜色:{1} 版本:{2} 付款方式:{3}".format(datetime.now(), sku_color, sku_version, sku_payment))
time.sleep(0.01)

def __login(self):
print("{0} 开始登陆华为账号".format(datetime.now()))
Expand Down