标签:blog imp pre common new abr ext 参考答案 row
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time browser = webdriver.Firefox() url = ‘https://gabrielecirulli.github.io/2048/‘ browser.get(url) game_ele = browser.find_element_by_class_name(‘game-container‘) while True: retry_ele = browser.find_element_by_class_name(‘retry-button‘) # new game if retry_ele.text == ‘Try again‘: retry_ele.click() game_ele = browser.find_element_by_class_name(‘game-container‘) game_ele.send_keys(Keys.UP) game_ele.send_keys(Keys.RIGHT) game_ele.send_keys(Keys.DOWN) game_ele.send_keys(Keys.LEFT)
python编程快速上手之第10章实践项目参考答案(11.11.3)
标签:blog imp pre common new abr ext 参考答案 row
原文地址:http://www.cnblogs.com/flying-wyf/p/6828240.html