Skip to content
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

ImageRecognition class unable to get dimensions from screenshot #45

Closed
kristapsmatvejevs opened this issue Dec 27, 2022 · 0 comments · Fixed by #46
Closed

ImageRecognition class unable to get dimensions from screenshot #45

kristapsmatvejevs opened this issue Dec 27, 2022 · 0 comments · Fixed by #46
Assignees

Comments

@kristapsmatvejevs
Copy link

kristapsmatvejevs commented Dec 27, 2022

  • ImageRecognition class always points to specific folder, instead of using the one from configuration. This means that if .set_screenshot_path("path/to") is set when creating NewDriverobject, all screenshots will be saved in the specified directory, but ImageRecognition class (size() method in this case) will look in path(__filename__) directory.
  • in TestUIDriver get_dimensions() method image_name is passed to save_screenshot() but for ImageRecognition constructor testui-image_name is passed, therefore the screenshot won't be found by ImageRecognition class (size() method) even if no screenshot path is set and default values are in use.
  • Lastly if no screenshot path is set then save_screenshot() method will append /reports_screenshot/ to the screenshot filename resulting in the screenshot being saved under "path/to/reports_screenshot/screenshot.png" where as when ImageRecognition class tries to read the screenshot it will look in "path/to/screenshot.png"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants