How to get attribute value of an element in Serenity?

How can I get attribute value of an element in Serenity?

Hi Emma,

You could refer to the sample code snippet below:

 //application launch
      driver.get("https://www.lambdatest.com/");

      // identify element
      WebElement l=driver.findElement(By.className("tools_logo"));

      // getAttribute() to get src value
      String value = l.getAttribute("src");
      System.out.println("Src attribute is: "+ value);