Questions tagged [android-uiautomator]
The uiautomator testing framework lets you test your user interface (UI) efficiently by creating automated functional UI testcases that can be run against your app on one or more devices.
890
questions
0
votes
0
answers
35
views
is there any alternate way to install appium uiautomator2 driver apart from running "appium driver install uiautomator2" from CLI
I am starting with a new project setup for mobile test automation with appium-java. I have installed appium server in my machine but facing a problem while installing appium drivers for Android and ...
0
votes
0
answers
29
views
UiAutomator UiSelector childSelector or equivalent but with advanced conditionals?
I'm struggling to identify any support to negate expressions when using the Android UiAutomator API.
I currently have a RecyclerView with several ViewGroup nested to it, and they can be either ...
0
votes
0
answers
43
views
Appium exited before timeout error on every second execution in WDIO
I am running a test suite using WebDriverIO and Appium to automate Android app testing. My test suite runs successfully on the first execution, but on the second execution, I am getting an "...
0
votes
0
answers
9
views
While running weditor getting 407 Proxy Authentication Required error
Always getting proxy authentication error although I have done proxy setup. Below is the error which I am getting.
Weditor is a python package - https://pypi.org/project/weditor/
PS C:\workspace\xyzz\...
0
votes
0
answers
13
views
Android Uiautomator problem about instance selector and dump
When I use UIautomator and I want to locate widget by instance and class
now I dump the xml like
<>
<> systemui textview
<> current app text view (target)
<>
That's to say, ...
0
votes
0
answers
9
views
Gradle task `connectedXXXAndroidTest` doesn't perform test cases under 1 specific directory
The instrument test file structure in AD is like this:
com.companyname.propjectname
integrationtest: 20 test cases
systemtest:
groupA: 30 test cases
[x] groupB: 50 + test cases
...
0
votes
0
answers
5
views
Check view postion towards other view using UI Automator
Basically the question.
I have created a tile for a WearOS, with two elements, and i want to check their positions towards each other in simple test - view X should be on the left of Y, and Y should ...
0
votes
0
answers
59
views
Getting error -Djava.ext is not supported. Use -classpath instead
I am using java 8 and trying to run uiautomatorviewer.bat of Appium tool but I'm getting below error.
Djava.ext.dirs=..\lib\x86_64;..\lib is not supported. Use -classpath instead.
Error: Could not ...
1
vote
0
answers
70
views
How do I get the parent UiSelector starting at its child?
Note: Working with Java 11 and Appium.
I am trying to get a MobileElement for an appium test suite using Android UiAutomators. Specifically I need to scroll to one so I am condtructing the locator ...
1
vote
1
answer
99
views
Cannot set AndroidDriver. AndroidUIAutomator2 cannot start a new session, with response code 500
I'm using Appium 2.0.0-beta.61 and AndroidUiAutomator2, and when I try to start the Android driver, it fails, returning Response Code 500. I tried removing the Appium server app from the device and ...
0
votes
1
answer
18
views
BaselineProfile for Phone/Tablet
How can I deal with the Baseline Profile generation when I have different code running depending on the device?
For example, I have some kind of method like this:
public static String runCode() {
...
0
votes
0
answers
43
views
Android App test automation using appium, selenium and UIAutomatorviewer
I am facing a problem on android application test automation using appium, selenium and uiautomatorviewer. I would like to ask what are other ways/alternatives to automate the app when the app has ...
0
votes
0
answers
20
views
Android UIAutomator: How to get current running test method's name in UI Test
In Xcode we use self.name to get class name combing method name for current performing UI test case. I'm wondering what is the equivalent in Android UI Test with UIAutomator framework?
This is what PO ...
1
vote
1
answer
50
views
Error on android using uiautomator2 on Pydroid3
I'm trying to automate tasks on Android, but when I run my code on Pydroid3 on Android, it return me a error...
My device is a Asus Zenfone Selfie 4
I'dont understand this error because the error is ...
0
votes
0
answers
19
views
UiSelector descriptionContains does not work
I am trying to write simile UiAutomator test.
When I inspect screen either throung layout inspector or UiAutomator. I see edit text with content description that says "Work Email"
However I ...
0
votes
0
answers
33
views
UIAutomatorViewer doesn't work with Android 8
I'm developing automatization programm with ADB. I use UIAutomatorViewer to find elements on my phone, that has Android 7.1.2 version. It works fine with it, but recently I needed to use another phone ...
0
votes
2
answers
307
views
Error message when trying to install driver on Appium cli
I've recently installed the Appium cli executing the command found on the official documentation:
npm install -g appium
When the installation ended successfully, I've tried to install the UI ...
0
votes
0
answers
32
views
Click on a cross (x) button inside of a search edit text view
I want to click on the cross (x) button which is a part of a search edit text view (search text field). The button doesn't have any resource Id or element. I tried the following ways to interact:
...
0
votes
0
answers
48
views
Get complete xml dump of a scrollable app page at once
I want to get the complete xml dump of a scrollable page of an android app running on emulator.
I tried using Appium's getPageSource(), but it gives only the viewable content dump.
I also tried using '...
0
votes
0
answers
17
views
What is alternative way to run a test repeatedly in Android Studio?
In Xcode, we could run a test repeatedly. I want to know what is the alternative in Android Studio.
Well, new to Android, our project is using UIAutomator for UI test. And I'd like to know if there is ...
0
votes
0
answers
11
views
How to reach file in Android test under the first page in Android App using Kotlin?
I write Kotlin test and I need to open the file after the file "Node Apr 23, 2017.pdf". But I can reach only the files from first page in the Download folder, by words "first page" ...
0
votes
0
answers
81
views
Pthon3 uiautomator2 : uiautomator2.exceptions.NullPointerExceptionError while useing dump_hierarchy function
I am trying to dump info by using dump_hierarchy over uiautomator2.
But NullPointerExceptionError occurred. When it occurred it can be fixed by itself.
Try it again and again. ...
0
votes
0
answers
198
views
Appium Uiautomator keeps crashing due to mjpegserver crash
Appium logs:
I ran this test on a real android device.
I changed the language and the country of the device using appium settings app, and some apps got updated like google play services.
After that ...
0
votes
0
answers
39
views
Can't find some compose using UiAutomator
I have the following code:
@Composable
fun Home(navController: NavHostController) {
val itemsList = (1..100).toList()
val itemsIndexedList = listOf("A", "B", "C")...
0
votes
0
answers
93
views
How to find an item having same id by index from a list view
In XCTest, we could find a specific UI element by index, for instance, a list view has reused item with same identifier.
app.staticTexts.matching(identifier: "BETTER").element(boundBy: 1)
...
0
votes
1
answer
264
views
How does Appium/UiAutomator actually see composables?
I have been rewriting my app to Jetpack Compose, and I already have existing Appium tests. After rewriting (using testTag modifiers to replace what used to be resource IDs) all of my tests work fine. ...
0
votes
0
answers
192
views
PytestUnhandledThreadExceptionWarning during uiautomator dump
In my pytest I am actually not doing much just making uiautomator dump and pull the created file to local path, but it does give me the below warning:
copporcomm_test/access_try.py::...
0
votes
0
answers
72
views
How to use "longClickGesture" in appium UiAutomator2 with x and y coordinates?
I'm fairly new to Appium, and trying to understand mobile gestures using UIautomator2 . The official documentation provides JAVA syntax on how to use the "longClickGesture" when element id ...
0
votes
1
answer
107
views
It doesn't always scroll to the same place, Appium Android
I am using the following method while scrolling android. but It doesn't always scroll to the same place, even though it's on the same page. what would be the reason.
public void ScrollToCampaignNotice(...
0
votes
0
answers
49
views
How to get the text value of a focused /selected item with uiautomator python wrapper
I need to get the text value of the focused/ selected item with uiautomator python wrapper. The framework needs to get the node with value ( focused = true) and return first text value of any of the ...
3
votes
0
answers
497
views
How to set id in Jetpack Compose for Appium and UIAutomator (Xpath issue)
I am using Jetpack Compose and Appium with UIAutomator. I would like to set a unique id for the Composables instead of showing the Xpath because of:
Using XPath locators is not recommended and can ...
0
votes
0
answers
33
views
how we can click on search button present on the keyboard of android mobile using UIautomator Framework
I was automation the script to search videos and I am unable to click on search button present on keyboard
I tried
device.pressEnter() and device.pressSearch()method of uiautomator
0
votes
0
answers
57
views
How can I start Instagram with my previously logged in account? Python, Appium
I'm automating processes in Instagram, and I would like to bypass a block that Instagram has for this type of actions. My code contemplates the login but the problem is that by repeating it many times,...
0
votes
1
answer
87
views
UiDevice.hasObject method takes too long time in UiAutomator
I write a auto testcase to test Tiktok
In the testcase, before I switch to next video, I will check the current video type, and do something.
Log.i(TAG, "check if it's a vr video")
val ...
1
vote
1
answer
257
views
What is the function of uiautomator apks present on the python wrapper for uiautomator 2
I am trying to read and understand how python wrapper for uiautomator2 works. What is the function of uiautomator apks present inside libs and how does this whole framework work?
Also, where did they ...
0
votes
1
answer
125
views
Where can I find examples of testing interactions with android homescreen widgets?
I see very little information on how to test RemoteViews. For example, I have used UiAutomator to place an app widget on the homescreen and now i want to test if it updates correctly when I click on ...
0
votes
0
answers
151
views
Why am i getting this exception in firebase crashlytics? IllegalStateException : UiAutomation not connected
I know that Google console runs Uiautomation tests(prelaunch).
However crash logs that i receive in firebase crashlytics do not seem to be related to the prelaunch process, because this exception ...
0
votes
0
answers
18
views
Pytest assertion that submit button is not present
I’m trying to write a test for test case where submit button is not present in application.
I wrote this assertion:
assert self.pages.is_submit_button_displayed() is False
is_submit_button_displayed ...
0
votes
1
answer
148
views
How to simulate app kill using either espresso or uiautomator?
We have a app that has some data stored in singleton classes. so, the data changes only after the app is killed. so,We have a usecase that require app kill in the middle of automation testing. How to ...
0
votes
0
answers
81
views
UIdevice.dumpWindowHierarchy() not working for WebView changes
I am using method dumpWindowHierarchy() to get the Hierarchy dump for my automation tests. It is working fine and giving me the hierarchy for the web-view window but the problem is when there is ...
3
votes
0
answers
95
views
adb uiautomator dump returns 0,0 bounds for clickable button
I'm trying to automate sending a picture on snapchat, using python and uiautomator dump. When I have taken the picture and am ready to click the send button, the uiautomator dump returns the button ...
0
votes
1
answer
184
views
Stop an Android app with UiAutomator/UiDevice
My app is bound to the service of another app (I don't have the source code of this one). I want to test the case when the binding with the service is broken. For this, I have a manual test where I ...
0
votes
0
answers
44
views
Is there any alternative way for LongpressGesture in Android Testing using POM model
I am getting following error while doing Android Testing using Appium(Java)
"java.lang.ClassCastException: class jdk.proxy2.$Proxy14 cannot be cast to class org.openqa.selenium.remote....
1
vote
1
answer
275
views
unable to start uiautomatorviewer in windows due to classpath error
I am unable to start uiautomatorviewer due to below error:
C:\Users\176226\AppData\Local\Android\Sdk\tools\bin>uiautomatorviewer
-Djava.ext.dirs=..\lib\x86_64;..\lib is not supported. Use -...
0
votes
0
answers
42
views
Android UIAutomator long click of exact time ms on device screen
I use this but its not working as expected:
fun UiDevice.press(x: Int, y: Int, time: Int) {
swipe(x, y, x, y, time / 5)
}
I am getting random lengths of press events. Is there any better solution ...
0
votes
2
answers
408
views
Appium-UIAutomator2-Java: the same code works directly from test and doesn't work from a function called in test
I'm writing mobile test using Appium+UIAutomator2+Java+JUnit5.
The point is when I'm calling the code from the test everything works fine and all elements can be located. When I'm using the same code ...
0
votes
0
answers
66
views
UiAutomator 2.1.2 waitForExist
I'm trying to do some tests in my application using bluestacks 5
with nodejs and https://www.npmjs.com/package/uiautomator-server
but when I send
await device.waitForExists(
{
description: 'Back',
...
1
vote
3
answers
6k
views
Error installing uiautomator2 driver with Appium
I am pretty new to appium and I tried installing the uiautomator2 driver to the latest appium version 2.0.0-beta.41 via the command appium driver install uiautomator2
I always get this output:
> ...
0
votes
0
answers
50
views
Android UiAutomator: How to wait for WIFI / Network to turn on?
When running a JUnit UI test, after turning on the WIFI, it takes about 2/3 seconds to actually come on. How can I wait for the WIFI to come back on without doing a thread.sleep(3000)?
It is possible ...
0
votes
0
answers
80
views
Appium selector methods: Appium Inspector and UIAutomatorViewer throwing errors
I am trying to use Appium together with robot framework to automate some tests for android-bluetooth connectivity. Currently, I am following a similar thought-architecture to something I've worked on ...