Converting session attribute from String to Integer

session("myAttribute").as[Int] causes a class cast exception from String to Integer, toInt will parse the String as an Integer.

Used where an integer (for example and expected status code) is read from a csv, for obtaining from the session as an integer.