Skip to content

Commit 60faaf4

Browse files
committed
Use test method name to send to capture if no annotation provided
1 parent cf8c7d5 commit 60faaf4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/frameworkium/tests/internal/BaseTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ public static void setUserAgent() {
114114
public void initialiseNewScreenshotCapture(Method testMethod) {
115115
if (ScreenshotCapture.isRequired()) {
116116
String testID = "n/a";
117+
try {
118+
testID = testMethod.getName();
119+
} catch (NullPointerException e) {}
117120
try {
118121
testID = testMethod.getAnnotation(Issue.class).value();
119122
} catch (NullPointerException e) {}
@@ -168,4 +171,4 @@ public SauceOnDemandAuthentication getAuthentication() {
168171
public static ScreenshotCapture getCapture() {
169172
return capture.get();
170173
}
171-
}
174+
}

0 commit comments

Comments
 (0)