Closed xrecoba closed 5 years ago
@wswebcreation, if this is feature makes sense and fits in the project, I wouldn't mind trying to implement it. Please let me know your thoughts. Thanks!
Hi @xrecoba
Sorry for my late response. I like the idea, but I don't think it should be the responsibility of this module.
In my opinion the framework / tool that is using a module should set the system under test in a state that should allow the module to do it's job.
This means that in your case you need to be sure that the page is ready, before you hand it over to the image compare library. There are some ways to check if images are done loading, maybe Google might help you with that.
For now I'm going to close this feature request, but it is still open for discussion
Hi @wswebcreation, Thanks for pointing me in what seems to be the right direction :). Google + SO gave me a possible solution to my problem, I wil try it whenever I have time. If it works I will just create a helper method so everytime we call checkScreen we also ensure that the image has been completely loaded already.
Is your feature request related to a problem? Please describe. I'm working on a web page with big slow images. The comparison tool sometimes returns me false negatives because the image has not been completely loaded whenever the comparison is made.
Describe the solution you'd like I can think of two possible solutions:
Note this second option can be implemented from the npm package consumer, I did a very quick and dirty approach to see if it worked (and it works on my machine). The problems with my bold implenetation are:
The function, in case it helps:
Describe alternatives you've considered I found this problem with protractor-image-comparison package. First headed there to see if the solution is feasible and then decided that it's a best fit for webdriver-image-comparison.
Additional context Nothing to add.