def final_deals(last_page):
"""
Finish the last step to ICO.
1. Input the num which we want to invest to the ICO.
2. Get the question that need we to solve.
3. Handle the request and finish the ICO.
:return:
"""
new_mark_page = driver.window_handles
driver.switch_to_window(new_mark_page[1])
driver.get(last_page)
time.sleep(0.5)
driver.find_element_by_class_name("numeric decimal optional nprice-input form-control").clear()
driver.find_element_by_class_name("numeric decimal optional nprice-input form-control").sendkey(input("Please input the num"
"that you want to invest"
"the ICO:"))
time.sleep(0.5)
driver.find_element_by_class_name("numeric decimal optional nprice-input form-control").send_keys(Keys.TAB)
handle_question = driver.find_element_by_class_name("title math-title").text
print(handle_question)
answer = input("Please input the answer:")
driver.find_element_by_class_name("form-control").clear()
driver.find_element_by_class_name("form-control").send_keys(answer)
time.sleep(0.5)
driver.find_element_by_class_name("btn btn-theme submit-btn disabled").click()
time.sleep(0.5)
评论列表
文章目录