Closed ankan17 closed 6 years ago
Following is the output generated when running python whatsapp.py friend "Test message"
(friend is a valid recipient) --
Traceback (most recent call last):
File "whatsapp.py", line 50, in <module>
main()
File "whatsapp.py", line 45, in main
pywhatsapp.sendMessage("\"" + args.friend + "\"", args.message)
File "whatsapp.py", line 27, in sendMessage
input_box = self.wait.until(EC.presence_of_element_located((By.XPATH, inp_xpath)))
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/support/wait.py", line 71, in until
value = method(self._driver)
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/support/expected_conditions.py", line 63, in __call__
return _find_element(driver, self.locator)
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/support/expected_conditions.py", line 353, in _find_element
raise e
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/support/expected_conditions.py", line 349, in _find_element
return driver.find_element(*by)
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 791, in find_element
'value': value})['value']
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 256, in execute
self.error_handler.check_response(response)
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: Unable to locate window
Exception ignored in: <bound method PyWhatsApp.__del__ of <__main__.PyWhatsApp object at 0x7f529433eef0>>
Traceback (most recent call last):
File "whatsapp.py", line 32, in __del__
self.browser.close()
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 541, in close
self.execute(Command.CLOSE)
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 256, in execute
self.error_handler.check_response(response)
File "/home/ankan/Projects/pyzapp/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette
The web browser opens the chat of the desired friend but fails to send the message