How to use one test method output will be another test method input by using dataproviders

48 views
Skip to first unread message

Om Prakash

unread,
Jun 5, 2014, 8:36:26 AM6/5/14
to seleniu...@googlegroups.com
Hi,

I am using data providers for test data .
In first method, i save records by replacing previous value in excel sheet and second method,I have to read new updated record through data provider but it gives older value.
Data providers are in same class file with different names.
 so how can i solve this issue?

can any one help to me.

Thanks& Regards,
Om Prakash

Shawn McCarthy

unread,
Jun 5, 2014, 10:16:29 AM6/5/14
to seleniu...@googlegroups.com
I couldn't find where selenium fits into this problem.

Gau Mun

unread,
Jun 5, 2014, 10:59:24 PM6/5/14
to seleniu...@googlegroups.com
It seem that you need to close the excel sheet to let it save your value in the first method.

It will be better if you provide a little code so we can easy to found the problem

Om Prakash

unread,
Jun 6, 2014, 1:03:25 AM6/6/14
to seleniu...@googlegroups.com
If we create excel object inside data provider method then it is working fine as our requirement . 

arunchandu ganta

unread,
Jun 6, 2014, 1:07:13 AM6/6/14
to seleniu...@googlegroups.com
Hi, 

Otherwise store the first excel or output on first method values in in list string array(i.e., ArrayList<String[] ) and use as input for second one.

Regards
Arunchandu Ganta

Oscar Rieken

unread,
Jun 7, 2014, 11:19:13 AM6/7/14
to seleniu...@googlegroups.com
IMO you should never make your tests dependent on each other


--
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/a5846cfd-d80a-4877-a27d-9b164f7af797%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages