For following element I need to locate the counts for Requeues, App Exits and Greets Started.
Further I will need to verify the counts for for each events.
0 Requeues 0 App Exits 2 Greets Started
Tried:
public void verifySessionMetricsWasGenerated(String metrics, int count) {
assertThat(findElements(By.xpath(“//div[contains(@class, ‘counts’) and contains(text(), ‘” + metrics + “‘)]”)))
.as(“Did not find expected number of metrics ‘” + metrics + “‘ ” + SpecContext.examSession())
.hasSize(count);
Got:
Expected size: 1 but was: 0 in:
[]
Stack Trace:
java.lang.AssertionError: [Did not find expected number of metrics ‘Greets Started’
NS S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.