-
Notifications
You must be signed in to change notification settings - Fork 28
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
Feature Request: Add optional timeout on functions that use reference_image #61
Comments
If the project owner likes this suggestion and would like i'd be happy to try implementing this feature. |
With the I'm currently bit busy for at least a month so contributions if you have time are more than welcome :) Reviewing & releasing I can do in timely manner. |
The only reason for adding to |
Keywords that now have the optional timeout are: - Click Image - Click To The Above Of Image - Click To The Below Of Image - Click To The Left Of Image - Click To The Right Of Image - Copy From The Above Of - Copy From The Below Of - Copy From The Left Of - Copy From The Right Of The default timeout is 0 sec so there is no functional change from previous version unless a timeout is set, this does require Pull request eficode#64 (fix for issue eficode#60) as a prerequisite for this change in order to work as expected. Please only merge after Pull request eficode#64
commit d95e646 Author: Dave Amies <[email protected]> Date: Sun Feb 27 13:23:14 2022 +1000 Add timeout option to keywords - Issue eficode#61 Keywords that now have the optional timeout are: - Click Image - Click To The Above Of Image - Click To The Below Of Image - Click To The Left Of Image - Click To The Right Of Image - Copy From The Above Of - Copy From The Below Of - Copy From The Left Of - Copy From The Right Of The default timeout is 0 sec so there is no functional change from previous version unless a timeout is set, this does require Pull request eficode#64 (fix for issue eficode#60) as a prerequisite for this change in order to work as expected. Please only merge after Pull request eficode#64
This feature request (well more a suggestion) is aimed primarily at the Click * Image and Does Exist keywords.
This feature would make imagehorizonlibrary behave more similarly to SeleniumLibrary and BrowserLibrary in that they both have a timeout waiting for the element to exist rather than failing immediately if the element is not already on the screen. I believe this change would make imagehorizonlibrary more user friendly especially to people new to this library.
My proposed solution would be simply to replace the self.locate with self.wait_for in the Click Image functions and probably also the Does Exist function. An optional timeout argument would be added to be passed to the wait_for function, this would be by default be set to 0 so that the current behaviour of these keywords is unchanged.
Obviously Issue #60 would need to be fixed first for this to work.
If this feature is also included on the locate keyword function it would make wait for redundant, not sure if that is a good or bad thing, but there is the possibility of consolidating those two.
An additional a keyword for set default timeout could also be added to change the default timeout from 0 to a value that the user chooses.
The text was updated successfully, but these errors were encountered: