Anyboday have code for selecting picture from the gallary

anyboday have code for selecting picture from the gallary.

pLease find the steps
1.Click on the photo icon on the nativeapp
2.it opens the gallary
3.Select a picture from the gallary
4.Clcik on save
5.upload the picture in the photo place

are you on ios or android?

on android there is a possibility that the whole photo picker is implemented by a custom view, so appium can’t see anything inside the view. so you may need to click by coordinates.

Hi,

Anybody know how to select aperticular file type rom the gallary.

public void SelectOneOFTheJPGImageFromThePath(String Filename){
	
String	filename = Filename;
	if(imageOnGallary.size()==0)
	{
		System.out.println(imageOnGallary.size());
	}
	else
	{
	    
		for (int i = 0 ; i< imageOnGallary.size() ; i++)
		{
			
			
			if(imageOnGallary.get(i).equals(filename));
			{
				
				imageOnGallary.get(i).click();
			
			}
			break;
		}
	
}

}