pythonでselenium使用時のエラーの回避方法を教えてください

予算
2,000円
納品希望日
ご相談
募集期限
募集終了 締切日 2022年5月13日 /
掲載日 2022年5月10日
応募状況
応募人数 3
契約人数 1
閲覧数 131
用途・種類
作業自動化・効率化
対応範囲
ー
用意してあるもの
企画書、開発環境
開発言語
Python

募集内容

依頼の概要・目的・背景
pythonでselenium使用時に以下エラーが出て処理が止まるため回避方法を教えてください。 ========== selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of [object String] "{\"element-6066-11e4-a52e-4f735466cecf\":\"86116ad5-45ff-4293-9037-88dacaf91578\"}" is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed Stacktrace: WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5 StaleElementReferenceError@chrome://remote/content/shared/webdriver/Errors.jsm:464:5 element.resolveElement@chrome://remote/content/marionette/element.js:681:11 evaluate.fromJSON@chrome://remote/content/marionette/evaluate.js:254:26 evaluate.fromJSON@chrome://remote/content/marionette/evaluate.js:262:29 receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:79:29 ========== プログラムの動作は以下になります。 使用driver :Firefox エラーで止まる箇所: ページ内のボタンを下記ループですべて押そうとしているときに処理の途中で止まります。 全てのページで止まるわけではなく、たまに止まってしまう状態です。 elemes = driver.find_elements_by_css_selector('span:nth-child(2) > input') for elem in elemes: elem.click() ソース全文が必要な場合は、取引時に公開させていただきます。
添付ファイル
ー
参考URL
ー
求めるスキル
python selenium
特記事項
ー

応募者一覧

応募者
応募日時
Yoko (ヨコ)
2022/05/11 00:23
神野。
2022/05/11 12:29
shkam
2022/05/11 19:04

募集内容についての質問

質問と回答の履歴

とりとうみ
とりとうみ
3年以上前
どのサイトのどこかだけ教えて貰うことは可能でしょうか?
まつじゃ
まつじゃ
3年以上前
まとめくすと言う5ちゃんねるのスレッドをまとめるツールサイトになります。(実際に利用するには無料登録が必要です) https://2mtmex.com/editor スレ内のimgur.comの画像に対して「埋込」というボタン機能があるのですが、該当のプログラムはこの「埋込」ボタンをすべてループで押すようにしています。
募集終了
ブックマーク
予算
2,000円
募集終了

募集者情報

まつじゃ
まつじゃ
5.0 (3)
3
発注件数
100%
発注率
100%
取引完了率
認証状況
本人確認
機密保持契約(NDA)

この募集内容に似ている仕事

予算
20万円
〜
25万円
応募者数 136
募集期限 あと 3 日 (11月14日まで)
user
Sonari
投稿日時:1日前