One way in which you can do this is to add the value of s1 as an attribute into your ITestContext (You can get access to it from within a @Test annotated TestNG method using org.testng.Reporter.getCurrentTestResult().getTestContext()) and then read it from your second class.
One caveat would be that you need to ensure that the classes are never run in parallel by TestNG.
PS : This forum is intended only for Selenium/WebDriver related queries. Since your question is more to do with “How do I share data between tests in TestNG” I would suggest that you please post these questions on the TestNG forum (testng-users testng...@googlegroups.com)
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/34a2edbb-e510-4d5e-aa89-544d6f9d7345%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.