# \[2.0.0-M3a\] What happened to Session.getAttribute()?

**URL:** <https://community.gatling.io/t/2-0-0-m3a-what-happened-to-session-getattribute/1200>\
**Category:** Gatling (Open-Source)\
**Created:** [July 22, 2014, 3:43pm UTC](https://community.gatling.io/t/2-0-0-m3a-what-happened-to-session-getattribute/1200 "2014-07-22T15:43:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://community.gatling.io/u/Alex)\
**Post date:** [July 22, 2014, 3:43pm UTC](https://community.gatling.io/t/2-0-0-m3a-what-happened-to-session-getattribute/1200/1 "2014-07-22T15:43:48Z")

</div>

Apologies if I’ve missed something obvious, but what’s happened to the `getAttribute` method of `Session` in Gatling 2.0? I can’t see it in the source, and I can’t call it in my Simulation. Have I missed something obvious? Or has it been renamed or removed?

Thanks for any pointers,

Alex

P.S. from code, these appear to the available methods:

$lessinit$greater$default$3,$lessinit$greater$default$4,$lessinit$greater$default$5,$lessinit$greater$default$6,$lessinit$greater$default$7,$lessinit$greater$default$8,$lessinit$greater$default$9,apply,apply$default$3,apply$default$4,apply$default$5,apply$default$6,apply$default$7,apply$default$8,apply$default$9,attributes,canEqual,contains,copy,copy$default$1,copy$default$2,copy$default$3,copy$default$4,copy$default$5,copy$default$6,copy$default$7,copy$default$8,copy$default$9,counterStack,curried,drift,enterGroup,enterInterruptable,enterTryMax,equals,exitGroup,exitInterruptable,exitLoop,exitTryMax,getClass,groupStack,hashCode,increaseDrift,incrementLoop,interrupt,interruptStack,logger,loopCounterValue,loopTimestampValue,markAsFailed,notify,notifyAll,productArity,productElement,productIterator,productPrefix,reducedInterruptStack,remove,removeAll,resetStatus,scenarioName,set,setAll,setAll,setDrift,shouldInterrupt,start,startDate,status,statusStack,toString,tupled,userId,wait,wait,wait

---

<div class="post-metadata">

**Author:** ![Michelle\_Burrows](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Michelle\_Burrows](https://community.gatling.io/u/Michelle_Burrows)\
**Post date:** [July 22, 2014, 3:47pm UTC](https://community.gatling.io/t/2-0-0-m3a-what-happened-to-session-getattribute/1200/2 "2014-07-22T15:47:58Z")

</div>

[https://github.com/excilys/gatling/wiki/Gatling-2#session](https://github.com/excilys/gatling/wiki/Gatling-2#session)

session(attributeName).as[AttributeType], e.g.: session(“username”).as[String]

---

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://community.gatling.io/u/Alex)\
**Post date:** [July 22, 2014, 3:59pm UTC](https://community.gatling.io/t/2-0-0-m3a-what-happened-to-session-getattribute/1200/3 "2014-07-22T15:59:08Z")

</div>

Thanks, staring me in the face. Presumably a direct result of:

case class SessionAttribute(session: Session, key: String) {  
def as[T]: T = session.attributes(key).asInstanceOf[T]  
…  
case class Session(  
…  
def apply(name: String) = SessionAttribute(this, name)

Back to Scala-school for me, I think.
