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

When logging exception message and screenshot in extent report, it is coming side by side rather than one bye one line. #405

Open
Snehaveeranna opened this issue Sep 6, 2023 · 3 comments
Labels
question Further information is requested

Comments

@Snehaveeranna
Copy link

Dependency used:

<dependency>
	 <groupId>com.aventstack</groupId>
	<artifactId>extentreports</artifactId>
	 <version>5.0.9</version>
</dependency>

Sample code:
ExtentTest.log(Status.FAIL, e.getMessage());
ExtentTest.log(Status.FAIL, " not found", MediaEntityBuilder.createScreenCaptureFromBase64String(Screenshotpath).build());
Scenario 1:
Where logs and screenshot are coming side by side.

image

Observation:
1.Issue obeserved when you have more number of lines in error message this issue is observed.

Scenario 2:
When the above code are interchanged, i mean if screenshot is added first and logs are added at last then report is coming as blank.
Attached screenshot for reference. Fig 1 is when the above code is interchanges as mentioned above.
Fig 2. When ExtentTest.generateLog(Status.INFO, e.getMessage()) is used instead of normal log for error message.
image

image

@anshooarora
Copy link
Member

I'm unsure how this can be reproduced. Can you share a sample report file or project that reproduces this?

@Snehaveeranna
Copy link
Author

I don't have that actually, issue can be reproduced when playwright uses autoscroll to identify the element and does multiple actions, like when you try to click on element which is hidden.
Also, do we have any character limit between lines for each log?

@anshooarora
Copy link
Member

No, I do not believe there is a character limit. I am still having a hard time understanding this issue and it would help if there is a sample I can look at, or a code snippet that I can use to reproduce this..

@anshooarora anshooarora added the question Further information is requested label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants