完美解決:python selenium 報(bào)錯(cuò) AttributeError: ‘WebDriver’ object has no attribute ‘find_element_by_id’
代碼如下
報(bào)錯(cuò)如下:
解決方式
selenium版本更新:find_element()
版本更新了,現(xiàn)在的寫(xiě)法為:
// 協(xié)助解決各種技術(shù)問(wèn)題饥悴,關(guān)注公眾號(hào):小千哥
driver.find_element(By.ID, 'kw').sendkeys('搜索')//關(guān)注公眾號(hào):小千哥