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

Screenshots are invalid #6

Open
NetanelMosheCohen opened this issue Dec 13, 2021 · 0 comments
Open

Screenshots are invalid #6

NetanelMosheCohen opened this issue Dec 13, 2021 · 0 comments

Comments

@NetanelMosheCohen
Copy link

NetanelMosheCohen commented Dec 13, 2021

I'm using the latest version 1.1.1 and running the tests on MAC.

When add_screenshot bool is set to True, an invalid screenshot is attached to the report:
image

I tried to figure out why, and I saw that the attachment is sent with 'mime': 'application/octet-stream':

self.service.log_step_result(end_time=timestamp(),
message=error_msg,
level='ERROR',
attachment={
'name': step_name,
'data': open(screenshot_name, 'rb'),
'mime': 'application/octet-stream'
},
item_id=item_id
)

When I change it to 'mime': 'image/png' it works as expected:
image

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

No branches or pull requests

1 participant