-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to send image with caption #38
Comments
Hello @victorterancas, This is really interesting Can you please adding to the main codebase and submit your pull request Let me know if you would need assistance and any further clarification on that You can also read How to make your first contribution Looking forward seeing your contribution Best regards |
Has this gotten merged in? I'd really like to use this feature. |
Manually added this to my system, and tested it. Seemed to work fine, so I created a PR for it. |
Issue ready to close? |
Yes. Thank you guys, i am still learning how to use github. 😅. Thank you @badi95 for giving me credits for the code, you made a nice job. |
Is my first time making a coment in github, i am sending an "improvement" of "send_picture()". It is how to send a picture with text on it:
def send_picture(self, picture, message): try: filename = os.path.realpath(picture) self.find_attachment() # To send an Image imgButton = self.wait.until(EC.presence_of_element_located( (By.XPATH, '//*[@id="main"]/footer//*[@data-icon="attach-image"]/../input'))) imgButton.send_keys(filename) inp_xpath = '//*[@id="app"]/div[1]/div[1]/div[2]/div[2]/span/div[1]/span/div[1]/div/div[2]/div/div[1]/div[3]/div/div/div[2]/div/div[2]' input_box = self.wait.until(EC.presence_of_element_located(( By.XPATH, inp_xpath))) input_box.send_keys(message + Keys.ENTER) self.send_attachment() print(f"Picture has been successfully sent to {self.mobile}") except (NoSuchElementException, Exception) as bug: print(bug) print(f'Failed to send a picture to {self.mobile}')
The text was updated successfully, but these errors were encountered: