Remove try-catch from Test classes
This commit is contained in:
parent
13f7d5dfdf
commit
41da06a7bc
|
@ -26,16 +26,11 @@ public class SeleniumWithJUnitLiveTest {
|
|||
|
||||
@Test
|
||||
public void whenAboutBaeldungIsLoaded_thenAboutEugenIsMentionedOnPage() {
|
||||
try {
|
||||
seleniumExample.getAboutBaeldungPage();
|
||||
String actualTitle = seleniumExample.getTitle();
|
||||
assertNotNull(actualTitle);
|
||||
assertEquals(actualTitle, expecteTilteAboutBaeldungPage);
|
||||
assertTrue(seleniumExample.isAuthorInformationAvailable());
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
seleniumExample.closeWindow();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,15 +26,10 @@ public class SeleniumWithTestNGLiveTest {
|
|||
|
||||
@Test
|
||||
public void whenAboutBaeldungIsLoaded_thenAboutEugenIsMentionedOnPage() {
|
||||
try {
|
||||
seleniumExample.getAboutBaeldungPage();
|
||||
String actualTitle = seleniumExample.getTitle();
|
||||
assertNotNull(actualTitle);
|
||||
assertEquals(actualTitle, expecteTilteAboutBaeldungPage);
|
||||
assertTrue(seleniumExample.isAuthorInformationAvailable());
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
seleniumExample.closeWindow();
|
||||
}
|
||||
seleniumExample.getAboutBaeldungPage();
|
||||
String actualTitle = seleniumExample.getTitle();
|
||||
assertNotNull(actualTitle);
|
||||
assertEquals(actualTitle, expecteTilteAboutBaeldungPage);
|
||||
assertTrue(seleniumExample.isAuthorInformationAvailable());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue