Skip to content

ImageRecognition class unable to get dimensions from screenshot #45

@kristapsmatvejevs

Description

@kristapsmatvejevs
  • 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"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions