I am getting the following error while trying to verify an assertion. I tried adding wait, but it didn't help.
java.lang.AssertionError: expected:<Risk Assessment Form: Completed> but was:<[[ChromeDriver: chrome on XP (73e81e18d39e6aaa89afd908b8438a82)] -> css selector: div.container-fluid > h3]>
The following is the code that I am writing:
page2.selectCreateRiskAssessment(); new WebDriverWait(driver, 30).until( ExpectedConditions.presenceOfAllElementsLocatedBy( By.linkText("View Risk Assessment")) ); assertEquals("Risk Assessment Form: Completed", driver.findElement(By.cssSelector("div.container-fluid > h3")) );