From 0851bf9bfa83bce44e70e70cbb80932223746e2f Mon Sep 17 00:00:00 2001 From: Julia Pottinger Date: Thu, 10 Aug 2017 10:07:17 -0500 Subject: [PATCH 1/5] Selectors, tests and functions to test that the services dropdowns navigate to the right page --- src/com/qualityworkscg/pages/Page.java | 34 ++++++++++++++ .../qualityworkscg/tests/AbstractTest.java | 2 +- .../qualityworkscg/tests/ServicesTest.java | 44 +++++++++++++++++++ testng.xml | 1 + 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 src/com/qualityworkscg/tests/ServicesTest.java diff --git a/src/com/qualityworkscg/pages/Page.java b/src/com/qualityworkscg/pages/Page.java index 91a98a6..08b0b60 100644 --- a/src/com/qualityworkscg/pages/Page.java +++ b/src/com/qualityworkscg/pages/Page.java @@ -1,11 +1,20 @@ package com.qualityworkscg.pages; +import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; public class Page { protected WebDriver driver; + + public static final String SERVICES_LOCATOR = "a[title='Services']"; + public static final String MOBILE_AUTOMATION_LOCATOR = "a[title='Mobile & Web Test Automation']"; + public static final String DEVOPS_CONSULTANCY_LOCATOR = "a[title='DevOps Consultancy']"; + public static final String SOFTWARE_DEVELOPMENT_LOCATOR ="a[title='Software Development Consultancy']"; + public static final String AGILE_COACHING_LOCATOR = "a[title='Agile Coaching']"; + public Page(WebDriver driver) { this.driver = driver; } @@ -17,6 +26,31 @@ public void navigate(String url) { public String getTitle() { return driver.getTitle(); } + + public void clickServices(){ + WebElement pageElement = driver.findElement(By.cssSelector(SERVICES_LOCATOR)); + pageElement.click(); + } + + public void clickMobileAutomation(){ + WebElement pageElement = driver.findElement(By.cssSelector(MOBILE_AUTOMATION_LOCATOR)); + pageElement.click(); + } + + public void clickDevOpsConsultancy(){ + WebElement pageElement = driver.findElement(By.cssSelector(DEVOPS_CONSULTANCY_LOCATOR)); + pageElement.click(); + } + + public void clickSoftwareDevelopment(){ + WebElement pageElement = driver.findElement(By.cssSelector(SOFTWARE_DEVELOPMENT_LOCATOR)); + pageElement.click(); + } + + public void clickAgileCoaching(){ + WebElement pageElement = driver.findElement(By.cssSelector(AGILE_COACHING_LOCATOR)); + pageElement.click(); + } public void tearDown() { try { diff --git a/src/com/qualityworkscg/tests/AbstractTest.java b/src/com/qualityworkscg/tests/AbstractTest.java index 8a70d59..3bcdccb 100644 --- a/src/com/qualityworkscg/tests/AbstractTest.java +++ b/src/com/qualityworkscg/tests/AbstractTest.java @@ -28,4 +28,4 @@ public void setup(String url) { public void afterTest() { page.tearDown(); } -} +} \ No newline at end of file diff --git a/src/com/qualityworkscg/tests/ServicesTest.java b/src/com/qualityworkscg/tests/ServicesTest.java new file mode 100644 index 0000000..8ed1095 --- /dev/null +++ b/src/com/qualityworkscg/tests/ServicesTest.java @@ -0,0 +1,44 @@ +package com.qualityworkscg.tests; + +import org.testng.Assert; +import org.testng.annotations.Test; + +public class ServicesTest extends AbstractTest{ + + @Test + public void verifyNavigationMobileAutomation () throws InterruptedException{ + page.clickServices(); + Thread.sleep(1000); + page.clickMobileAutomation(); + Thread.sleep(2000); + Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Mobile and Web Automation", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); + } + + @Test + public void verifyNavigationDevOpsConsultancy () throws InterruptedException{ + page.clickServices(); + Thread.sleep(1000); + page.clickDevOpsConsultancy(); + Thread.sleep(2000); + Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | DevOps Consultancy", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); + } + + @Test + public void verifyNavigationSoftwareDevelopment () throws InterruptedException{ + page.clickServices(); + Thread.sleep(1000); + page.clickSoftwareDevelopment(); + Thread.sleep(2000); + Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Software Development Consultancy", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); + } + + @Test + public void verifyNavigationAgileCoaching () throws InterruptedException{ + page.clickServices(); + Thread.sleep(1000); + page.clickAgileCoaching(); + Thread.sleep(2000); + Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Agile Coaching and Training", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); + } + +} diff --git a/testng.xml b/testng.xml index cea05a3..a1f0388 100644 --- a/testng.xml +++ b/testng.xml @@ -5,6 +5,7 @@ + From 0b6b377b37ac86acefe2c853f441296c7b901e3a Mon Sep 17 00:00:00 2001 From: Julia Pottinger Date: Thu, 10 Aug 2017 10:13:38 -0500 Subject: [PATCH 2/5] Added comments --- src/com/qualityworkscg/pages/Page.java | 6 +++++- src/com/qualityworkscg/tests/ServicesTest.java | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/com/qualityworkscg/pages/Page.java b/src/com/qualityworkscg/pages/Page.java index 08b0b60..2340846 100644 --- a/src/com/qualityworkscg/pages/Page.java +++ b/src/com/qualityworkscg/pages/Page.java @@ -8,7 +8,6 @@ public class Page { protected WebDriver driver; - public static final String SERVICES_LOCATOR = "a[title='Services']"; public static final String MOBILE_AUTOMATION_LOCATOR = "a[title='Mobile & Web Test Automation']"; public static final String DEVOPS_CONSULTANCY_LOCATOR = "a[title='DevOps Consultancy']"; @@ -27,26 +26,31 @@ public String getTitle() { return driver.getTitle(); } + //Function to click the Services dropdown public void clickServices(){ WebElement pageElement = driver.findElement(By.cssSelector(SERVICES_LOCATOR)); pageElement.click(); } + //Function to click the Mobile Automation dropdown public void clickMobileAutomation(){ WebElement pageElement = driver.findElement(By.cssSelector(MOBILE_AUTOMATION_LOCATOR)); pageElement.click(); } + //Function to click the DevOps Consultancy dropdown public void clickDevOpsConsultancy(){ WebElement pageElement = driver.findElement(By.cssSelector(DEVOPS_CONSULTANCY_LOCATOR)); pageElement.click(); } + //Function to click the Software Development dropdown public void clickSoftwareDevelopment(){ WebElement pageElement = driver.findElement(By.cssSelector(SOFTWARE_DEVELOPMENT_LOCATOR)); pageElement.click(); } + //Function to click the Agile Coaching dropdown public void clickAgileCoaching(){ WebElement pageElement = driver.findElement(By.cssSelector(AGILE_COACHING_LOCATOR)); pageElement.click(); diff --git a/src/com/qualityworkscg/tests/ServicesTest.java b/src/com/qualityworkscg/tests/ServicesTest.java index 8ed1095..60aac51 100644 --- a/src/com/qualityworkscg/tests/ServicesTest.java +++ b/src/com/qualityworkscg/tests/ServicesTest.java @@ -6,6 +6,7 @@ public class ServicesTest extends AbstractTest{ @Test + //Function to verify that the Mobile Automation navigates to the correct page. public void verifyNavigationMobileAutomation () throws InterruptedException{ page.clickServices(); Thread.sleep(1000); @@ -15,6 +16,7 @@ public void verifyNavigationMobileAutomation () throws InterruptedException{ } @Test + //Function to verify that the DevOps Consultancy navigates to the correct page. public void verifyNavigationDevOpsConsultancy () throws InterruptedException{ page.clickServices(); Thread.sleep(1000); @@ -24,6 +26,7 @@ public void verifyNavigationDevOpsConsultancy () throws InterruptedException{ } @Test + //Function to verify that the Software Development navigates to the correct page. public void verifyNavigationSoftwareDevelopment () throws InterruptedException{ page.clickServices(); Thread.sleep(1000); @@ -33,6 +36,7 @@ public void verifyNavigationSoftwareDevelopment () throws InterruptedException{ } @Test + //Function to verify that the Agile Coaching navigates to the correct page. public void verifyNavigationAgileCoaching () throws InterruptedException{ page.clickServices(); Thread.sleep(1000); From 24e649d4ac00cc86de73635e7d6d98d55aa1bef3 Mon Sep 17 00:00:00 2001 From: Julia Pottinger Date: Thu, 10 Aug 2017 10:38:23 -0500 Subject: [PATCH 3/5] Updated comments --- src/com/qualityworkscg/tests/ServicesTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/qualityworkscg/tests/ServicesTest.java b/src/com/qualityworkscg/tests/ServicesTest.java index 60aac51..a79dac0 100644 --- a/src/com/qualityworkscg/tests/ServicesTest.java +++ b/src/com/qualityworkscg/tests/ServicesTest.java @@ -6,7 +6,7 @@ public class ServicesTest extends AbstractTest{ @Test - //Function to verify that the Mobile Automation navigates to the correct page. + //Function to verify that the Mobile Automation drop down navigates to the correct page. public void verifyNavigationMobileAutomation () throws InterruptedException{ page.clickServices(); Thread.sleep(1000); @@ -16,7 +16,7 @@ public void verifyNavigationMobileAutomation () throws InterruptedException{ } @Test - //Function to verify that the DevOps Consultancy navigates to the correct page. + //Function to verify that the DevOps Consultancy drop down navigates to the correct page. public void verifyNavigationDevOpsConsultancy () throws InterruptedException{ page.clickServices(); Thread.sleep(1000); @@ -26,7 +26,7 @@ public void verifyNavigationDevOpsConsultancy () throws InterruptedException{ } @Test - //Function to verify that the Software Development navigates to the correct page. + //Function to verify that the Software Development drop down navigates to the correct page. public void verifyNavigationSoftwareDevelopment () throws InterruptedException{ page.clickServices(); Thread.sleep(1000); @@ -36,7 +36,7 @@ public void verifyNavigationSoftwareDevelopment () throws InterruptedException{ } @Test - //Function to verify that the Agile Coaching navigates to the correct page. + //Function to verify that the Agile Coaching drop down navigates to the correct page. public void verifyNavigationAgileCoaching () throws InterruptedException{ page.clickServices(); Thread.sleep(1000); From 6c951d430d1b571ebbe24bf3e19f4c09aca7ae43 Mon Sep 17 00:00:00 2001 From: Julia Pottinger Date: Thu, 10 Aug 2017 13:08:44 -0500 Subject: [PATCH 4/5] added WebDriverWait. Note: there still exists some thread.sleep --- src/com/qualityworkscg/pages/Page.java | 39 +++++++++++-------- .../qualityworkscg/tests/ServicesTest.java | 4 -- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/com/qualityworkscg/pages/Page.java b/src/com/qualityworkscg/pages/Page.java index 2340846..6b829a9 100644 --- a/src/com/qualityworkscg/pages/Page.java +++ b/src/com/qualityworkscg/pages/Page.java @@ -1,12 +1,17 @@ package com.qualityworkscg.pages; +import java.util.concurrent.TimeUnit; + import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; public class Page { protected WebDriver driver; + WebDriverWait wait; public static final String SERVICES_LOCATOR = "a[title='Services']"; public static final String MOBILE_AUTOMATION_LOCATOR = "a[title='Mobile & Web Test Automation']"; @@ -16,45 +21,47 @@ public class Page { public Page(WebDriver driver) { this.driver = driver; + wait = new WebDriverWait (driver, 10); } public void navigate(String url) { driver.navigate().to(url); - } + } public String getTitle() { return driver.getTitle(); } //Function to click the Services dropdown - public void clickServices(){ - WebElement pageElement = driver.findElement(By.cssSelector(SERVICES_LOCATOR)); + public void clickServices() throws InterruptedException{ + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(SERVICES_LOCATOR))); pageElement.click(); - } + } //Function to click the Mobile Automation dropdown - public void clickMobileAutomation(){ - WebElement pageElement = driver.findElement(By.cssSelector(MOBILE_AUTOMATION_LOCATOR)); + public void clickMobileAutomation() throws InterruptedException{ + //wait = new WebDriverWait (driver, 10); + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(MOBILE_AUTOMATION_LOCATOR))); pageElement.click(); - } + } //Function to click the DevOps Consultancy dropdown - public void clickDevOpsConsultancy(){ - WebElement pageElement = driver.findElement(By.cssSelector(DEVOPS_CONSULTANCY_LOCATOR)); + public void clickDevOpsConsultancy() throws InterruptedException{ + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(DEVOPS_CONSULTANCY_LOCATOR))); pageElement.click(); - } + } //Function to click the Software Development dropdown - public void clickSoftwareDevelopment(){ - WebElement pageElement = driver.findElement(By.cssSelector(SOFTWARE_DEVELOPMENT_LOCATOR)); + public void clickSoftwareDevelopment() throws InterruptedException{ + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(SOFTWARE_DEVELOPMENT_LOCATOR))); pageElement.click(); - } + } //Function to click the Agile Coaching dropdown - public void clickAgileCoaching(){ - WebElement pageElement = driver.findElement(By.cssSelector(AGILE_COACHING_LOCATOR)); + public void clickAgileCoaching() throws InterruptedException{ + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(AGILE_COACHING_LOCATOR))); pageElement.click(); - } + } public void tearDown() { try { diff --git a/src/com/qualityworkscg/tests/ServicesTest.java b/src/com/qualityworkscg/tests/ServicesTest.java index a79dac0..ac76da5 100644 --- a/src/com/qualityworkscg/tests/ServicesTest.java +++ b/src/com/qualityworkscg/tests/ServicesTest.java @@ -9,7 +9,6 @@ public class ServicesTest extends AbstractTest{ //Function to verify that the Mobile Automation drop down navigates to the correct page. public void verifyNavigationMobileAutomation () throws InterruptedException{ page.clickServices(); - Thread.sleep(1000); page.clickMobileAutomation(); Thread.sleep(2000); Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Mobile and Web Automation", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); @@ -19,7 +18,6 @@ public void verifyNavigationMobileAutomation () throws InterruptedException{ //Function to verify that the DevOps Consultancy drop down navigates to the correct page. public void verifyNavigationDevOpsConsultancy () throws InterruptedException{ page.clickServices(); - Thread.sleep(1000); page.clickDevOpsConsultancy(); Thread.sleep(2000); Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | DevOps Consultancy", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); @@ -29,7 +27,6 @@ public void verifyNavigationDevOpsConsultancy () throws InterruptedException{ //Function to verify that the Software Development drop down navigates to the correct page. public void verifyNavigationSoftwareDevelopment () throws InterruptedException{ page.clickServices(); - Thread.sleep(1000); page.clickSoftwareDevelopment(); Thread.sleep(2000); Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Software Development Consultancy", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); @@ -39,7 +36,6 @@ public void verifyNavigationSoftwareDevelopment () throws InterruptedException{ //Function to verify that the Agile Coaching drop down navigates to the correct page. public void verifyNavigationAgileCoaching () throws InterruptedException{ page.clickServices(); - Thread.sleep(1000); page.clickAgileCoaching(); Thread.sleep(2000); Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Agile Coaching and Training", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); From 14118ffdec990782dd84e13ff015abd1d2ebae28 Mon Sep 17 00:00:00 2001 From: Julia Pottinger Date: Thu, 10 Aug 2017 16:32:28 -0500 Subject: [PATCH 5/5] replaced thread.sleep with webdriver wait. Fixed space vs tabs along with other code styles. --- src/com/qualityworkscg/pages/Page.java | 47 +++++++++++-------- .../qualityworkscg/tests/ServicesTest.java | 36 +++++++------- 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/src/com/qualityworkscg/pages/Page.java b/src/com/qualityworkscg/pages/Page.java index 6b829a9..0a2c868 100644 --- a/src/com/qualityworkscg/pages/Page.java +++ b/src/com/qualityworkscg/pages/Page.java @@ -7,63 +7,70 @@ import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; +import org.testng.Assert; public class Page { protected WebDriver driver; WebDriverWait wait; + public static final String SERVICES_LOCATOR = "a[title='Services']"; public static final String MOBILE_AUTOMATION_LOCATOR = "a[title='Mobile & Web Test Automation']"; public static final String DEVOPS_CONSULTANCY_LOCATOR = "a[title='DevOps Consultancy']"; public static final String SOFTWARE_DEVELOPMENT_LOCATOR ="a[title='Software Development Consultancy']"; public static final String AGILE_COACHING_LOCATOR = "a[title='Agile Coaching']"; - public Page(WebDriver driver) { + public static final String BASE_URL = "http://www.qualityworkscg.com/"; + + public Page (WebDriver driver) { this.driver = driver; wait = new WebDriverWait (driver, 10); } - public void navigate(String url) { + public void navigate (String url) { driver.navigate().to(url); } - public String getTitle() { + public String getTitle () { return driver.getTitle(); } //Function to click the Services dropdown - public void clickServices() throws InterruptedException{ - WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(SERVICES_LOCATOR))); - pageElement.click(); + public void clickServices () { + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(SERVICES_LOCATOR))); + pageElement.click(); } //Function to click the Mobile Automation dropdown - public void clickMobileAutomation() throws InterruptedException{ - //wait = new WebDriverWait (driver, 10); - WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(MOBILE_AUTOMATION_LOCATOR))); - pageElement.click(); + public void clickMobileAutomation () { + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(MOBILE_AUTOMATION_LOCATOR))); + pageElement.click(); + wait.until(ExpectedConditions.urlMatches(BASE_URL + "automation/")); } //Function to click the DevOps Consultancy dropdown - public void clickDevOpsConsultancy() throws InterruptedException{ - WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(DEVOPS_CONSULTANCY_LOCATOR))); - pageElement.click(); + public void clickDevOpsConsultancy () { + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(DEVOPS_CONSULTANCY_LOCATOR))); + pageElement.click(); + wait.until(ExpectedConditions.urlMatches(BASE_URL + "devops/")); } //Function to click the Software Development dropdown - public void clickSoftwareDevelopment() throws InterruptedException{ - WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(SOFTWARE_DEVELOPMENT_LOCATOR))); - pageElement.click(); + public void clickSoftwareDevelopment () { + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(SOFTWARE_DEVELOPMENT_LOCATOR))); + pageElement.click(); + wait.until(ExpectedConditions.urlMatches(BASE_URL + "software-development-consultancy/")); } //Function to click the Agile Coaching dropdown - public void clickAgileCoaching() throws InterruptedException{ - WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(AGILE_COACHING_LOCATOR))); - pageElement.click(); + public void clickAgileCoaching () { + WebElement pageElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(AGILE_COACHING_LOCATOR))); + pageElement.click(); + wait.until(ExpectedConditions.urlMatches(BASE_URL + "agile-coaching/")); } - public void tearDown() { + public void tearDown () { try { this.driver.quit(); } catch(Exception e) { diff --git a/src/com/qualityworkscg/tests/ServicesTest.java b/src/com/qualityworkscg/tests/ServicesTest.java index ac76da5..64590c4 100644 --- a/src/com/qualityworkscg/tests/ServicesTest.java +++ b/src/com/qualityworkscg/tests/ServicesTest.java @@ -7,38 +7,34 @@ public class ServicesTest extends AbstractTest{ @Test //Function to verify that the Mobile Automation drop down navigates to the correct page. - public void verifyNavigationMobileAutomation () throws InterruptedException{ - page.clickServices(); - page.clickMobileAutomation(); - Thread.sleep(2000); - Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Mobile and Web Automation", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); + public void verifyNavigationMobileAutomation () { + page.clickServices(); + page.clickMobileAutomation(); + Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Mobile and Web Automation", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); } @Test //Function to verify that the DevOps Consultancy drop down navigates to the correct page. - public void verifyNavigationDevOpsConsultancy () throws InterruptedException{ - page.clickServices(); - page.clickDevOpsConsultancy(); - Thread.sleep(2000); - Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | DevOps Consultancy", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); + public void verifyNavigationDevOpsConsultancy () { + page.clickServices(); + page.clickDevOpsConsultancy(); + Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | DevOps Consultancy", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); } @Test //Function to verify that the Software Development drop down navigates to the correct page. - public void verifyNavigationSoftwareDevelopment () throws InterruptedException{ - page.clickServices(); - page.clickSoftwareDevelopment(); - Thread.sleep(2000); - Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Software Development Consultancy", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); + public void verifyNavigationSoftwareDevelopment () { + page.clickServices(); + page.clickSoftwareDevelopment(); + Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Software Development Consultancy", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); } @Test //Function to verify that the Agile Coaching drop down navigates to the correct page. - public void verifyNavigationAgileCoaching () throws InterruptedException{ - page.clickServices(); - page.clickAgileCoaching(); - Thread.sleep(2000); - Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Agile Coaching and Training", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); + public void verifyNavigationAgileCoaching () { + page.clickServices(); + page.clickAgileCoaching(); + Assert.assertEquals(page.getTitle(), "QualityWorks Consulting Group | Agile Coaching and Training", "Testing if title is QualityWorks Consulting Group | Mobile and Web Automation"); } }