Skip to content
This repository was archived by the owner on Oct 6, 2024. It is now read-only.

Commit de491f2

Browse files
committed
Fixed SoftAssert assignment
1 parent 7d95c23 commit de491f2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/test/java/demo/TestCases.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
public class TestCases {
1919
WebDriver driver;
20-
SoftAssert sa = new SoftAssert();
20+
SoftAssert sa;
2121

2222
@BeforeClass
2323
public void createDriver() {
@@ -73,6 +73,8 @@ public void TestCase001() {
7373
@Test(priority = 2, enabled = true, description = "Verify movie is marked 'A' for Mature and movie is either 'Comedy' or 'Animation'")
7474
public void TestCase002() {
7575
YouTubeUtils.logStatus("TC002", "Start", "Verify movie is marked 'A' for Mature and movie is either 'Comedy' or 'Animation'");
76+
sa = new SoftAssert();
77+
7678
// Navigate to the "Films" tab
7779
By filmsTab = By.xpath("//a[contains(@title, 'Films') or contains(@title, 'Movies')]");
7880
YouTubeUtils.scrollToViewport(driver, filmsTab);
@@ -102,6 +104,8 @@ public void TestCase002() {
102104
@Test(priority = 2, enabled = true, description = "Verify number of tracks is 50 or less")
103105
public void TestCase003() {
104106
YouTubeUtils.logStatus("TC003", "Start", "Verify number of tracks is 50 or less");
107+
sa = new SoftAssert();
108+
105109
// Navigate to the "Music" tab of the application
106110
By musicTab = By.xpath("//a[contains(@title, 'Music')]");
107111
YouTubeUtils.scrollToViewport(driver, musicTab);

0 commit comments

Comments
 (0)