Open phofmeier opened 1 year ago
It's working, thanks @phofmeier ! :)
This is cool @phofmeier
I see here you on the
wait_for_link_preview(self, timeout=30)
method, The timeout time to wait for the preview is configurable but you haven't provided the same flexibility when it's getting called insend_message()
orsend_direct_message()
where the only configurable parameter is whether to enable or disable it.Also Just to clarify is there some test you've run to make the 30s the default time to wait for the preview to show?
I changed the argument to provide access to change the timeout.
The time needed seams to be depending on the link and the used system. On my Andorid phone it most time needs around 5s and on IOS 1s. It looks like there is no good default value to provide.
Overview
Added feature to wait for a Link Preview.
Successfully tested with Chrome Browser and Chrome-Driver 110.0.5481.77 Not tested with anything else.
Related to Issue #25
Implementation
send_message
andsend_direct_message