Android.WebKit.WebView is not finding element (button)

Hi I’m using Appium Studio to run a sequence of tests on my own mobile app. But on my app there is a option of “Forgot password” after following the steps to recover the password, the user recieves an e-mail (In this case I’m using Mailinator) and has to open the navigator (Mobile Google Chrome) to change the password. So far so good.
But when the user opens the google chrome web page there are 2 fields that he needs to insert the new password and 1 button to click to change password.
I tried to use driver.findElement(By.xpath("//*[@class='android.webkit.WebView']")).click();
To click on the button, but as I checked on UiAutomatorViewer all the fields of that webpage are called android.webkit.WebView.

My question is: How can I do to the Appium Studio scripts identify the button that contains the text Change Password? I tried to use driver.findElement(By.xpath("//*[@class='android.webkit.WebView']/text[@text='Change Password'] but it still doesn’t recognize the button.

Here is the uiautomatorviwer screenshot

HI Lucas

  1. Instrument your applicaiton -

You’ll have the ability to spy on web elements (e.g - use html attributes)

  1. Open the object spy from appium studio - and not the one from UIAutomator, it’ll show you the properties you can

Hi Tom it worked when I changed the command to:

> driver.findElement(By.xpath("//*[@id='commit']")).click();

great, happy to hear :+1: