I have a problem accessing the excel data from testng Data Provider. In simple words, There are two classes and the first class is to write some data into excel file and second class is used to retrieve the data from the same file. Testng executes fine if I ran them separately like execute first class and then second class.
The problem is when you try to execute both the classes under the Testng suite(first class and followed by second) the testng loads both the classes excel file same time before opening up the browsers. because of this old value is used for second class and not the updated values by first class.
Is there any way i can load the data provider before that particular class execution.