alright
alright copied to clipboard
find by username not working
When i try to get a chat by username i get a traceback and dont select any chats.
2023-03-10 01:20:22,042 - root -- [ERROR] >> Exception raised while getting first chat: Message: invalid element state (Session info: chrome=111.0.5563.64) Stacktrace: Backtrace: (No symbol) [0x00E2DCE3] (No symbol) [0x00DC39D1] (No symbol) [0x00CD4C70] (No symbol) [0x00CFA1DF] (No symbol) [0x00D1AECC] (No symbol) [0x00CF8726] (No symbol) [0x00D1B224] (No symbol) [0x00D2D57C] (No symbol) [0x00D1ACC6] (No symbol) [0x00CF6F68] (No symbol) [0x00CF80CD] GetHandleVerifier [0x010A3832+2506274] GetHandleVerifier [0x010D9794+2727300] GetHandleVerifier [0x010DE36C+2746716] GetHandleVerifier [0x00ED6690+617600] (No symbol) [0x00DCC712] (No symbol) [0x00DD1FF8] (No symbol) [0x00DD20DB] (No symbol) [0x00DDC63B] BaseThreadInitThunk [0x75FA00F9+25] RtlGetAppContainerNamedObjectPath [0x777A7BBE+286] RtlGetAppContainerNamedObjectPath [0x777A7B8E+238] Traceback (most recent call last): File "C:\Users\gustje04\Nextcloud\Projekte\Whatsapp Automation\alright\__init__.py", line 775, in get_last_message_received if self.find_by_username(query): File "C:\Users\gustje04\Nextcloud\Projekte\Whatsapp Automation\alright\__init__.py", line 164, in find_by_username search_box.clear() File "C:\Users\gustje04\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 116, in clear self._execute(Command.CLEAR_ELEMENT) File "C:\Users\gustje04\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 403, in _execute return self._parent.execute(command, params) File "C:\Users\gustje04\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute self.error_handler.check_response(response) File "C:\Users\gustje04\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.InvalidElementStateException: Message: invalid element state (Session info: chrome=111.0.5563.64) Stacktrace: Backtrace: (No symbol) [0x00E2DCE3] (No symbol) [0x00DC39D1] (No symbol) [0x00CD4C70] (No symbol) [0x00CFA1DF] (No symbol) [0x00D1AECC] (No symbol) [0x00CF8726] (No symbol) [0x00D1B224] (No symbol) [0x00D2D57C] (No symbol) [0x00D1ACC6] (No symbol) [0x00CF6F68] (No symbol) [0x00CF80CD] GetHandleVerifier [0x010A3832+2506274] GetHandleVerifier [0x010D9794+2727300] GetHandleVerifier [0x010DE36C+2746716] GetHandleVerifier [0x00ED6690+617600] (No symbol) [0x00DCC712] (No symbol) [0x00DD1FF8] (No symbol) [0x00DD20DB] (No symbol) [0x00DDC63B] BaseThreadInitThunk [0x75FA00F9+25] RtlGetAppContainerNamedObjectPath [0x777A7BBE+286] RtlGetAppContainerNamedObjectPath [0x777A7B8E+238]
sorry im not quite sure what information is needet feel free to ask me. :)
I can confirm this. I am seeing this after the latest update to Chrome. I wonder if this is a regression.
OTOH, the error indicates that somehow the website or the rendering of it is responsible.
@leggewie @math-milan Looking into this
@Kalebu Did you find anything yet?
I think I solved it! The xpath for the search bar in __init__.py
seems to be outdated, instead of this:
'//*[@id="app"]/div[1]/div[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[2]',
it should instead be this:
'//*[@id="side"]/div[1]/div/div/div[2]/div/div',
I'm too dumb to do a merge or something but for now you can replace it yourselves.
@math-milan @leggewie @Kalebu
Edit: Also, this only seems to work on my Windows PC, not Raspberry Pi...
Thank you, @allesman. That worked for me. But isn't that already part of the latest code (changed in 8ea3456fde8555b9573a10a72e7a92d727bd5ff4)? Are you using the latest code from git? I am not.