jupyter notebookでpythonのseleniumのwebdreverを使ってYahoo.mailにログインしようとしているのですが、表題の例外が発生して出来ません。
どうしたらいいのかご教授の程よろしくお願いします。
以下該当コードとトレースバックです。
python3
1from selenium import webdriver 2 3wbd = webdriver.Chrome() 4wbd.get("https://mail.yahoo.com") 5login_elem = wbd.find_element_by_link_text("Sign in") 6login_elem.click() 7 8email_elem = wbd.find_element_by_id("login-username") 9 10email_elem.send_keys("not_my_real_email") 11password_elem = wbd.find_element_by_id("login-passwd") 12password_elem.send_keys("12345") 13password_elem.submit()
Traceback
1 2NoSuchElementException: Message: no such element: Unable to locate element: {"method":"id","selector":"login-username"} 3 (Session info: chrome=74.0.3729.131) 4 (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64)
IDはGoogleの検証で調べてそのままコピーしたので間違いないはずです。
name属性などでやれば行けるかもしれませんが、今後のためにIDでの取得が出来るようになっておきたいので質問させて頂きました。
回答の程よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。