我試圖自動生成大量的用戶在網頁kahoot.it使用硒,使他們出現在類的前面,但是,我得到selenium.common.exceptions.NoSuchElementException:消息:無法找到元素:
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element:
{"method":"id","selector":"inputSession"}
任何幫助將非常感激:試圖訪問inputSession項(其中你寫的遊戲ID進入遊戲)
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.kahoot.it")
gameID = driver.find_element_by_id("inputSession")
username = driver.find_element_by_id("username")
gameID.send_keys("53384")
這是錯誤時,此錯誤消息! :)
如何在HTML是什麼樣子? – Saifur 2014-11-24 19:38:08
您可以查看kahoot.it的全部代碼,但相關部分是:
– 2014-11-24 19:47:10