Is there any way I can do this for Failure test methods?
2. @BeforeSuite - variable defined is not passed to Test Methods.
Class - SeleniumBase
@BeforeSuite -> Using TestNg Parameter (if value is QA) set a variable "path=www.qatest.com"
Class - Test 1
@Test -- Try to use path variable
Class - Test 2
@Test-- Try to use path variable
Test are failing as the path variable is Null.
If I change BeforeSuite to BeforeMethod it's working. Any idea what's the mistake i am doing?
Note:
Problem I face after putting this method in @AfterMethod
1. I can't see the image in the Reporter log as failure exception was shown
2. some time the failure occurred on the first page, but the screen shot taken was on the last page.
Re: Attaching Screen shots to TestNG report + @Before suite issue
Administrator
1. Screen shot would be pushed to folder which is specified in tear down
2. Screen shot would be of the page where assertion failed or any other exception was encounterd