NoSuchElementFound - ProgressBar

Hi friends,
Question is: if progress bar is visible when i upload image from camera or gallery == image uploaded successfully.
else image not uploaded.

Here am not able locate element , getting error can any one help on this will be appreciated.

@Sharath_Shetty

can you try like this

Thread.sleep(4000);
boolean flag=false;
try
{
new WebDriverWait(driver, 60).until(ExpectedConditions.invisibilityOfElementLocated(By.className(“android.widget.ProgressBar”)));
flag=true;
System.out.println(“Image uploaded”);
}
catch (TimeoutException e)
{
System.out.println(“Image not uploaded in 60 sec”);
}

		if(flag && next.isEnabled())
		{
			next.click();
		}
		else
		{
		System.out.println("next button is not clickable");		
		}
1 Like

@PramodKarande

It Worked thanks for the solution.

Keep Helping Others, Cheers!