Open dafner opened 2 years ago
thanks MoudiZd ,
I mofidied the wapi.js file according to your suggestion But the problem persiste getting the battery level. Now I get the following message: "selenium.common.exceptions.JavascriptException: Message: SyntaxError: missing ] after element list"
By the way, I am testing the original wapi.js file and the modied sample "log_all.py" in order to descart any problems in my library
Any Idea about how to this problem? How I can monitoring the battery level of my cell phone?
Thank in advance!
In line 82 of the log_all.py file I add the following line and modified the print function:
level = driver.get_battery_level()
print(
"Checking for more messages, status. Pinger={pingcount} {level}".format(
pingcount=pinger,
),
driver.get_status(), level
)
python3 log_all.py Waiting for QR Bot started EXCEPTION: Message: SyntaxError: missing ] after element list
Traceback (most recent call last):
File "/home/administrador/workspace/test/WebWhatsapp-Wrapper/log_all.py", line 76, in
You must share you wapi.js
file here, so we can help you... As the error now says missing ]
that means that some syntax errors occured and we cannot help you solving syntax errors without taking a look to your whole wapi.js
file contents
The real problem is with the structure of window.Store
and the way is injected within modules, and if the entioned fix is not applied you will not be able to access this object...
Sorry, I found the problem. I have been make a mistake when I copied & pasted the code in wapi.js file Now I can get again the battery level
Thanks you very much for your help!
Hello ,
I found that the getBatteryLevel function has stopped working again because "Store.Conn" does not exist or this definition does not exist.
The same happens with other functions that make use of "Store.Conn"
Any ideas on how to get the battery status or a replacement from Store.Conn?
Any help will be appreciate
Thanks!!!