This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
7 / 7
Feb 2019

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.

  • created

    Jan '19
  • last reply

    Feb '19
  • 6

    replies

  • 626

    views

  • 4

    users

  • 2

    likes

  • 1

    link

22 days later
9 days later

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.