htmlの「このサプライヤーの商品を注文する」ボタンをクリックしたいです。
html
1<div class="orderAdvanceBtn btmMgnSet3"> 2 <a href="javascript:void(0);" class="btnType01 btnColor01 btnEffects" onclick="javascript:buyCart(15914134);">このサプライヤーの商品を注文する<i class="fa fa-chevron-right leftMgnSet" aria-hidden="true"></i></a> 3</div>
pythonでボタンクリックするように書きました。
python
1driver.find_element_by_css_selector('.btnType01.btnColor01.btnEffects').click()
うまくいかず、エラーになります。
VScode
1c:\Users\mi_chan\Documents\tampopo\PSauto.py:89: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead 2 driver.find_element_by_css_selector('.btnType01.btnColor01.btnEffects').click() 3Exception in Tkinter callback 4Traceback (most recent call last): 5 File "C:\Users\mi_chan\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__ 6 return self.func(*args) 7 File "c:\Users\mi_chan\Documents\tampopo\PSauto.py", line 89, in btnURL_click 8 driver.find_element_by_css_selector('.btnType01.btnColor01.btnEffects').click() 9 File "C:\Users\mi_chan\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 81, in click 10 self._execute(Command.CLICK_ELEMENT) 11 File "C:\Users\mi_chan\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 710, in _execute 12 return self._parent.execute(command, params) 13 File "C:\Users\mi_chan\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 424, in execute 14 self.error_handler.check_response(response) 15 File "C:\Users\mi_chan\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response 16 raise exception_class(message, screen, stacktrace) 17selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable 18 (Session info: chrome=96.0.4664.110) 19Stacktrace: 20Backtrace: 21 Ordinal0 [0x00BF6903+2517251] 22 Ordinal0 [0x00B8F8E1+2095329] 23 Ordinal0 [0x00A92710+1058576] 24 Ordinal0 [0x00ABE324+1237796] 25 Ordinal0 [0x00AB4037+1196087] 26 Ordinal0 [0x00AD64D3+1336531] 27 Ordinal0 [0x00AB3A36+1194550] 28 Ordinal0 [0x00AD65BA+1336762] 29 Ordinal0 [0x00AE5BBF+1399743] 30 Ordinal0 [0x00AD639B+1336219] 31 Ordinal0 [0x00AB27A7+1189799] 32 Ordinal0 [0x00AB3609+1193481] 33 GetHandleVerifier [0x00D85904+1577972] 34 GetHandleVerifier [0x00E30B97+2279047] 35 GetHandleVerifier [0x00C86D09+534521] 36 GetHandleVerifier [0x00C85DB9+530601] 37 Ordinal0 [0x00B94FF9+2117625] 38 Ordinal0 [0x00B998A8+2136232] 39 Ordinal0 [0x00B999E2+2136546] 40 Ordinal0 [0x00BA3541+2176321] 41 BaseThreadInitThunk [0x765CFA29+25] 42 RtlGetAppContainerNamedObjectPath [0x77337A9E+286] 43 RtlGetAppContainerNamedObjectPath [0x77337A6E+238] 44 45[28248:11488:1221/150632.489:ERROR:gpu_init.cc(457)] Passthrough is not supported, GL is disabled, ANGLE is 46[16856:28156:1221/150640.235:ERROR:gpu_init.cc(457)] Passthrough is not supported, GL is disabled, ANGLE is
質問の仕方が下手ですみませんが、よろしくお願いいたします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/12/22 06:49
2021/12/22 09:35
2021/12/23 03:31
2021/12/23 04:04 編集
2021/12/23 06:01
2021/12/23 06:16 編集
2021/12/23 07:26
2021/12/23 08:50
2021/12/23 09:38