So I’m trying to write a test on a hybrid application. And I have a field of type android.widget.Spinner which I want to click on to select one of the options. First thing I should do is to find it, right? Here we go, no problem.
driver.findElement(By.className("android.widget.Spinner"));
I find it very easly, but when I try to click on it using driver.findElement(By.className("android.widget.Spinner")).click();
NOTHING happens.
Ok let’s try another thing.
I’m trying to get its coordinates by using getLocation()
method, and its working perfectly. But, when I use tap method with exaclty the same coordinates - it returns an invalid coordinates error! How is it even possible? How can coordinates provided by driver itself be invalid?
Changing the context? The method getContextHandles()
returns only one - “NATIVE_APP” and nothing more. I just want to perform test - any ideas?