title: how to click AlertDialog NegativeButton in python Appium api?
body: <p>I am a fresh in Appium. I use this code to show permission alert and I want to test it.</p>
  <pre><code>        new AlertDialog.Builder(activity).setTitle(&quot;ALERT&quot;)
              .setMessage(reason)
              .setNegativeButton(&quot;OK&quot;,
                      new DialogInterface.OnClickListener() {
                          @Override
                          public void onClick(DialogInterface dialog,
                                              int which) {
                              ActivityCompat.requestPermissions(activity,new String[]{permissionType},requestCode);
                          }
                      }).create().show();
  </code></pre>
  <p>I use appium desktop and python appium-client ,how to wait until this alert dialog show and then catch this NegativeButton and click it?</p>