Development

I am using selenium web driver and appium as this is mobile application automation,

I am trying to check that if element is there or not and based on that I have put conditions.

long starttime = System.currentTimeMillis();
long endtime = starttime + 60*1000; // 60 seconds * 1000 ms/sec;

while(System.currentTimeMillis() < endtime)
{

notcount = driver.findElement(By.id(AppConstants.notificationcount));

}

if(notcount.equals(null))

{

System.out.println(“No Element found”);
}
else
{

//SOME ANOTHER STEPS
}

Here issue is when element is not there , instead to redirect to ELSE part , selenium stops execution and throwing exception.

I do not want to use List -findelements here as that is taking long time to find element.

The blog discusses how Acceptance Test-Driven Development (ATDD) ensures software development aligns with user requirements by creating acceptance tests before coding. It improves collaboration among teams, helps prioritize user needs, and resolves issues early, resulting in high-quality, user-centric software. ATDD facilitates agile practices, improving business growth and delivering value by ensuring software meets technical and business goals.
The post How Acceptance Test-Driven Development (ATDD) Drives Business Value and Growth  first appeared on TestingXperts.