Comments (7)
Hi cyril4paris,
In webwhatsapp.py
Alter
'qrCode':".qrcode > img:nth-child(4)",
to
'qrCode': "._2EZ_m > img:nth-child(4)",
In case this doesn't work, go to web whatsapp and inspect the element. Try copying the css selector and use it in your code :-
from webwhatsapp-wrapper.
In webwhatsapp.py
Alter
'qrCode':".qrcode > img:nth-child(4)",
to
'qrCode': ".qrcode > img",
from webwhatsapp-wrapper.
Thanks friend ;)
from webwhatsapp-wrapper.
Not working for me.
C:\Users\pier\Desktop\WhatsAPI-masterBuh>python sample.py
waiting for QR
Traceback (most recent call last):
File "sample.py", line 5, in
driver.firstrun()
File "C:\Users\pier\Desktop\WhatsAPI-masterBuh\webwhatsapi_init_.py", line 68, in firstrun
qr = self.driver.find_element_by_css_selector(self._SELECTORS['qrCode'])
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 498, in find_element_by_css_selector
return self.find_element(by=By.CSS_SELECTOR, value=css_selector)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 832, in find_element
'value': value})['value']
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 297, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: .qrcode > img
from webwhatsapp-wrapper.
Wait until qrCode appears, count up to 2 seconds, and read
from webwhatsapp-wrapper.
thank now it working
from webwhatsapp-wrapper.
Hello Wictor
I meet the same issue but despite altering qrcode and waiting 2seconds before reading QR code.
Can you help?
E:\scripts\WhatsAPI\sample>e:\install\python363\python.exe send.py Traceback (most recent call last): File "send.py", line 4, in <module> driver.firstrun() File "e:\install\python363\lib\site-packages\webwhatsapi-1.0.3-py3.6.egg\webwhatsapi\__init__.py", line 72, in firstrun qr = self.driver.find_element_by_css_selector(self._SELECTORS['qrCode']) File "e:\install\python363\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 509, in find_element_by_css_selector return self.find_element(by=By.CSS_SELECTOR, value=css_selector) File "e:\install\python363\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 855, in find_element 'value': value})['value'] File "e:\install\python363\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 308, in execute self.error_handler.check_response(response) File "e:\install\python363\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: .qrcode > img
Source of send.py is:
import time
from webwhatsapi import WhatsAPIDriver
driver = WhatsAPIDriver()
driver.firstrun()
time.sleep(10)
driver.send_to_phone_number("0783XXXXXX", "hello")
from webwhatsapp-wrapper.
Related Issues (20)
- Chromium Not opening web whatsapp
- How can I send a vcard or contact to a chat? It doesn't work. HOT 4
- javascript error: circular reference HOT 1
- Does anyone know how can I send a reaction to a message? HOT 1
- Problem In implementation
- https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/23#issuecomment-355776501 HOT 1
- New WhatsApp version ? Broken contacts and undefined attributes HOT 1
- window.WAPI doesn't exist HOT 2
- window.WAPI.sendImage is not working in chrome after chrome and whatsApp update HOT 5
- Error for read new messages HOT 3
- getbaterrylevel is not working
- Make call on whatsapp and play pre recorded audio when call connect
- cannot read properties of undefined (reading 'sendmessage') for numbers not in contact list HOT 3
- TypeError: __init__() got an unexpected keyword argument 'desired_capabilities' HOT 1
- circular reference - get_all_chats
- Uncaught ReferenceError: webpackChunkwhatsapp_web_client is not defined HOT 16
- Uncaught TypeError: window.Store is undefined HOT 1
- error cannot read properties of indenfined (reading chat) HOT 1
- not getting any chats in WAPI and WAPI.isLoggedIn() is not working HOT 1
- Error in function getAllMessageIdsInChat
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webwhatsapp-wrapper.