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

adding sleep to load image in case of bulk messages #93

Open arsalankhan994 opened 1 year ago

arsalankhan994 commented 1 year ago

Hi @euriconicacio, I hope you are well. The problem that I was facing is that when I called send_picture inside the loop, then some of the images are not sent properly and shows an error icon because the browser close immediately after sending an image. So I tested this same case with 0.1 sleep, then 0.2 and then 0.3, and it perfectly worked on 0.3 seconds. I have tested this same thing with different images and attachments and I think that it should work in all cases. Thanks

euriconicacio commented 1 year ago

Hi @euriconicacio, I hope you are well. The problem that I was facing is that when I called send_picture inside the loop, then some of the images are not sent properly and shows an error icon because the browser close immediately after sending an image. So I tested this same case with 0.1 sleep, then 0.2 and then 0.3, and it perfectly worked on 0.3 seconds. I have tested this same thing with different images and attachments and I think that it should work in all cases. Thanks

Hi, @arsalankhan994! Thanks for the reply. Got your intent over there, thanks a lot for your contribution. One small consideration + one small request:

  1. One of our current efforts focuses on implementing unit tests and rolling this into TDD. So, we are being a little more strict with contributions triage - thanks a lot for the comprehension on this topic, btw;

  2. As a consequence, considering the current non-unit-tests state, could you please perform three tests and provide the output for them (for output, consider time to run and sleep length employed)?

    • The first test, with maximum attachment size (slightly lower than 16MB - maybe 15.9MB) on your current computer+internet connection configuration;
    • The second one, with your current file size and optimized (as much as possible, ideally measured) internet connection configuration;
    • The third one with mixed first and second tests - maximum attachment size and optimized internet connection.

    Please, let us know if that's not possible, so we can pull your branch and run them. Thanks!

euriconicacio commented 1 year ago

Hi, @arsalankhan994. Any update on the requested test outputs? Thanks.

Hi, @b98430. I will be deleting your comment from this PR. Please, address it as an issue. Thanks.