In my application there is image upload option, On clicking upload image an action sheet will be opened with two options Gallery,Camera.The issue is on clicking upload image button it automatically clicking the first option in action sheet which is camera option.But I want to click on second option which is Gallery.
I am also facing the same problem. Have u find any solution?
I asked the developer to place gallery option top,Problem solved though this is not right way.
Also experiencing the same problem. Is there anyway of selecting any other option in an action sheet rather than just the first item?
I am able to click the buttons by Accessibility Ids
I have two buttons >> Take A Photo and Choose from Library
driver.findElement(By.id(âChoose from Libraryâ)).click();
Above one works for me.
Yours will be working like
driver.findElement(By.id(âGalleryâ)).click();
I found that by removing âautoAcceptAlertsâ: âtrueâ from my environment setup allowed me to access the different elements in the action sheetâŚ
In your driverâs DesiredCapabilities, Please remove âAUTO_ACCEPT_ALERTSâ Capability or set it to false. Action sheet is considered as an alert and first item in sheet is tapped to accept the alert.
Not sure whether it is an appium feature or ios bug.
Hi There,
I am having the same issue. In my case, I have two buttons âPhoto Libraryâ (top button and this is what I need to select) and âCancelâ bottom button. My test always selects (bottom) âCancelâ button. Even though accessibility ID is correct. For a work around, I changed the code locally that âPhoto Libraryâ to the bottom button then it get selected. But this is not the ideal scenario, I need to find out the way how to select âPhoto Libraryâ button without changing the position.
Also, if I search for this element in appium desktop using accessibility id, element can be found and can do tap on it. Why it is not working when I run the code?
Also, I canât disable âAUTO_ACCEPT_ALERTSâ Capability, since I have couple of alerts needs to be dismissed. So set it as true.
Please help me on this.
Thank you in advance!
Here is the screenshot of the page I am having trouble to find element.
yup,Iâm doing the same
possible solution
http://appium.io/docs/en/advanced-concepts/settings/