Skip to content

Commit dc635c2

Browse files
author
Cleverson Sampaio
committed
feat(report): report class with failure method
1 parent c98df78 commit dc635c2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
#
4+
# Copyright (c) 2022 Cléverson Sampaio <cleverson@sampaio.dev.br>
5+
6+
from robot.libraries.BuiltIn import BuiltIn
7+
8+
class Report:
9+
def __init__(self):
10+
pass
11+
12+
def fail(self, exception: Exception):
13+
self.driver = BuiltIn().get_library_instance('SeleniumLibrary')
14+
self.driver.capture_page_screenshot("EMBED")
15+
BuiltIn().fail(exception)

0 commit comments

Comments
 (0)