Quantcast

TestNG dependsOnMethods Capability for sharing data between two methods

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

TestNG dependsOnMethods Capability for sharing data between two methods

Indweb Internet
Hi

I'm trying to use a variable defined in method 1 in method 2 and method2 depends on method1 and according to dependsOnMethods Capability we should be able to share data between different methods.But I'm getting the error as variable not defined. Please help me where am I going wrong.

I have attached a java file where I'm trying to use result variable defined in login method inside the logout method which depends on login method.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

OnDepends.java (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TestNG dependsOnMethods Capability for sharing data between two methods

Julien Herr
Already answered: https://github.com/cbeust/testng/issues/1323

Le lundi 6 février 2017 08:25:42 UTC+1, Indweb Internet a écrit :
Hi

I'm trying to use a variable defined in method 1 in method 2 and method2 depends on method1 and according to dependsOnMethods Capability we should be able to share data between different methods.But I'm getting the error as variable not defined. Please help me where am I going wrong.

I have attached a java file where I'm trying to use result variable defined in login method inside the logout method which depends on login method.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Loading...