Forum Discussion
Sachin_Sawe
18 years agoContributor
Hi Ole,
Are you sure we can set anything other than text based properties on context? I have tried this in the past and had no success. I tried it again, in my setup script I do:
//one way
conn = Sql.newInstance(url, usr, pwd, driver)
context.setProperty("sqlConn", conn)
//another way
context.sqlConn = Sql.newInstance(url, usr, pwd, driver)
and it seems it does not work because in one of my test steps
when I access context.sqlConn it gives me null pointer exception
Any suggestions?
Thanks,
Sachin
Are you sure we can set anything other than text based properties on context? I have tried this in the past and had no success. I tried it again, in my setup script I do:
//one way
conn = Sql.newInstance(url, usr, pwd, driver)
context.setProperty("sqlConn", conn)
//another way
context.sqlConn = Sql.newInstance(url, usr, pwd, driver)
and it seems it does not work because in one of my test steps
when I access context.sqlConn it gives me null pointer exception
Any suggestions?
Thanks,
Sachin