Skip to content

Commit b369544

Browse files
committed
chore: removal of the attachment approach in favor of the Allure listener
1 parent 5e7913a commit b369544

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/main/java/com/eliasnogueira/report/AllureManager.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,14 @@
2424

2525
package com.eliasnogueira.report;
2626

27-
import com.eliasnogueira.driver.DriverManager;
2827
import com.eliasnogueira.enums.Target;
2928
import com.github.automatedowl.tools.AllureEnvironmentWriter;
3029
import com.google.common.collect.ImmutableMap;
31-
import io.qameta.allure.Attachment;
32-
import org.openqa.selenium.TakesScreenshot;
3330

3431
import java.util.HashMap;
3532
import java.util.Map;
3633

3734
import static com.eliasnogueira.config.ConfigurationManager.configuration;
38-
import static org.openqa.selenium.OutputType.BYTES;
3935

4036
public class AllureManager {
4137

@@ -59,14 +55,4 @@ public static void setAllureEnvironmentInformation() {
5955

6056
AllureEnvironmentWriter.allureEnvironmentWriter(ImmutableMap.copyOf(basicInfo));
6157
}
62-
63-
@Attachment(value = "Failed test screenshot", type = "image/png")
64-
public static byte[] takeScreenshotToAttachOnAllureReport() {
65-
return ((TakesScreenshot) DriverManager.getDriver()).getScreenshotAs(BYTES);
66-
}
67-
68-
@Attachment(value = "Browser information", type = "text/plain")
69-
public static String addBrowserInformationOnAllureReport() {
70-
return DriverManager.getInfo();
71-
}
7258
}

0 commit comments

Comments
 (0)