Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to accept Use current location permission popup in Appium?

    • 0
    • 0
    • 0
    • 0
    • 3
    • 0
    • 0
    • 0
    • 1.61k
    Comment on it

    There are some applications that requires user location when they are launched for the first time. The application requests to accept or reject the location. A popup appears and it should either be accepted or rejected. Its very difficult to locate the elements of the popup. So, we have to set the capability to accept the location services.

    capabilities.setCapability("locationServicesAuthorized", true);

    On setting the above capability, when the application is launched location popup will appear and it is accepted automatically because we have set the locationServicesAuthorized capability as true.


    capabilities.setCapability("autoAcceptAlerts", true);

    In case, if there are some other popups also in application and we want that those should be accepted when it appears then we can set the above capability as true.

 3 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: