Kalebu / alright

Python wrapper for WhatsApp web-based on selenium
https://www.youtube.com/watch?v=yitQTt-NukM
MIT License
368 stars 110 forks source link

AttributeError: 'WebElement' object has no attribute 'aria_role' #86

Closed web-triton closed 1 year ago

web-triton commented 1 year ago

====== WebDriver manager ====== Current google-chrome version is 106.0.5249 Get LATEST chromedriver version for 106.0.5249 google-chrome Driver [C:\Users\mdolm.wdm\drivers\chromedriver\win32\106.0.5249.61\chromedriver.exe] found in cache

DevTools listening on ws://127.0.0.1:59091/devtools/browser/b75f5f59-4093-4469-a55f-3e0f002fdb45 2022-10-19 19:33:59,520 - root -- [ERROR] >> An exception occurred: 'WebElement' object has no attribute 'aria_role' Traceback (most recent call last): File "C:\Users\mdolm\OneDrive\Документы_python\wa_рассылка_3\alright\alright__init__.py", line 425, in send_message1 if i.aria_role == "textbox": AttributeError: 'WebElement' object has no attribute 'aria_role' 2022-10-19 19:33:59,521 - root -- [INFO] >> 3

Kalebu commented 1 year ago

Hi @web-triton

I suggest you use the send-direct-message method

>>> from alright import WhatsApp
>>> messenger = WhatsApp()
>>> >>> messenger.send_direct_message('25573652xxx', 'Hello')
2022-08-14 17:27:57,264 - root -- [INFO] >> Message sent successfuly to 
2022-08-14 17:27:57,264 - root -- [INFO] >> send_message() finished running!
>>> messenger.send_direct_message('25573652xxx', 'Who is This ?', False)
2022-08-14 17:28:30,953 - root -- [INFO] >> Message sent successfuly to 255736524388
2022-08-14 17:28:30,953 - root -- [INFO] >> send_message() finished running!

Let me know if you still have issues

web-triton commented 1 year ago

Thank you for your reply

web-triton commented 1 year ago

Thank you messenger.send_direct_message('25573652xxx', 'Hello') it worked

Kalebu commented 1 year ago

Cool, I'm glad it did

I will now close this issue