So I have two tests, one that check the sign up "test01_signIn", if it's a PASS, it goes to the the second test "test02_CheckNewsStandElements", which checks the visibility of an element of the homepage. The only issue is that the first test has a DataProvider like the following:
@Test(dataProvider = "Data")
public void test01_signIn(String idMedia, String nomMedia, String idSSO, String mdpSSO, String lien)
{
//Test
}
@Test
public void test02_CheckNewsStandElements()
{
WebDriverWait wait = new WebDriverWait(driver,5);
WebElement modalCloseButton = null;
modalCloseButton = nsp.modalCloseButton(driver);
try
{
wait.until(ExpectedConditions.visibilityOf(modalCloseButton));
}catch(TimeoutException e){
System.out.println("The Element isn't visible");
}
}
@DataProvider(name="Data")
public Object [][] getLists() throws IOException, GeneralSecurityException
{
Object [][] objects = newEDLI.importData().clone();
return objects;
}
The results I get are more like:
Test1
Test1
Test1
...
Test2.
(only one iteration of Test2)
While I'm looking for a result like this:
Test1
Test2
Test1
Test2