Explore all UI Testing open source software, libraries, packages, source code, cloud functions and APIs.

Popular New Releases in UI Testing

cypress-realworld-app

v1.0.18

puppeteer-sharp

v7.0.0

phantomas

Browser storage handling

chrome

v1.6.0

cypress-cucumber-preprocessor

v4.3.1

Popular Libraries in UI Testing

nightmare

by segmentio doticonjavascriptdoticon

star image 19138 doticon

A high-level browser automation library.

cypress-realworld-app

by cypress-io doticontypescriptdoticon

star image 3274 doticonMIT

A payment application to demonstrate real-world usage of Cypress testing methods, patterns, and workflows.

pdf-bot

by esbenp doticonjavascriptdoticon

star image 2534 doticonMIT

🤖 A Node queue API for generating PDFs using headless Chrome. Comes with a CLI, S3 storage and webhooks for notifying subscribers about generated PDFs

puppeteer-sharp

by hardkoded doticoncsharpdoticon

star image 2271 doticonMIT

Headless Chrome .NET API

phantomas

by macbre doticonjavascriptdoticon

star image 2200 doticonBSD-2-Clause

Headless Chromium-based web performance metrics collector and monitoring tool

boxen

by boxen doticonrubydoticon

star image 1590 doticonMIT

Manage Mac development boxes with love (and Puppet).

chrome

by chrome-php doticonphpdoticon

star image 1410 doticonMIT

Instrument headless chrome/chromium instances from PHP

egghead-next

by eggheadio doticontypescriptdoticon

star image 1160 doticonNOASSERTION

The frontend for egghead.io.

cypress-cucumber-preprocessor

by TheBrainFamily doticonjavascriptdoticon

star image 947 doticonMIT

Run cucumber/gherkin-syntaxed specs with cypress.io

Trending New libraries in UI Testing

cypress-realworld-app

by cypress-io doticontypescriptdoticon

star image 3274 doticonMIT

A payment application to demonstrate real-world usage of Cypress testing methods, patterns, and workflows.

egghead-next

by eggheadio doticontypescriptdoticon

star image 1160 doticonNOASSERTION

The frontend for egghead.io.

cypress-real-events

by dmtrKovalenko doticontypescriptdoticon

star image 414 doticonMIT

Fire native system events from Cypress.

cypress

by laracasts doticonphpdoticon

star image 366 doticonMIT

Laravel Cypress Integration

cypress-terminal-report

by archfz doticonjavascriptdoticon

star image 284 doticonMIT

Better terminal and file output for cypress test logs.

cypress-audit

by mfrachet doticonjavascriptdoticon

star image 271 doticonMIT

⚡ Run Lighthouse and Pa11y audits directly in your E2E test suites

cypress-react-selector

by abhinaba-ghosh doticonjavascriptdoticon

star image 225 doticonMIT

:zap: cypress plugin to locate react elements by component, props and state

obs-cli

by muesli doticongodoticon

star image 194 doticonMIT

OBS-cli is a command-line remote control for OBS

Vitamin

by wtchnm doticontypescriptdoticon

star image 166 doticonMIT

Opinionated Vite starter template.

Top Authors in UI Testing

1

bahmutov

101 Libraries

star icon2814

2

cypress-io

35 Libraries

star icon5764

3

mdcruz

6 Libraries

star icon23

4

wlsf82

6 Libraries

star icon43

5

YOU54F

5 Libraries

star icon61

6

samlucax

4 Libraries

star icon167

7

testdrivenio

4 Libraries

star icon55

8

Ebazhanov

3 Libraries

star icon7

9

NicholasBoll

3 Libraries

star icon187

10

AmazeeLabs

3 Libraries

star icon20

1

101 Libraries

star icon2814

2

35 Libraries

star icon5764

3

6 Libraries

star icon23

4

6 Libraries

star icon43

5

5 Libraries

star icon61

6

4 Libraries

star icon167

7

4 Libraries

star icon55

8

3 Libraries

star icon7

9

3 Libraries

star icon187

10

3 Libraries

star icon20

Trending Kits in UI Testing

When testing something in software, the first thing that comes to mind is unit testing. But UI testing is also a very important thing. It allows you to test your application as a whole and not only its parts. Java UI testing libraries are used to test Java user interface. These libraries are a set of classes and methods that support executing a test on an application's user interface. The Top 11 Java UI Testing Open Source Projects are the following including selenide - Concise UI Tests with Java; FluentLenium - mobile automation framework which extends Selenium; video-recorder-java - library allows easily record video of your UI tests.

As a Python developer, you will do backend development with Flask, Django or FastAPI and you will need to test your APIs. You may also work on web frontend development using HTML, CSS and JavaScript.. You can write tests to verify the correct functioning of your application, including clicks on buttons or links, inputting text in the fields, checking for exceptions and errors, etc. Here's our list of 9 best Python UI testing open source libraries you should know: pywinauto - Windows GUI Automation with Python; selene - Useroriented Web UI browser tests in Python; Droidutan - Droidutan the Android Orangutan is a smart monkey that analyzes and tests Android applications.

A JavaScript UI testing library will help you automate the tests. You can write tests to verify the correct functioning of your application, including clicks on buttons or links, inputting text in the fields, checking for exceptions and errors, etc. Once the tests are written, they can be run and repeated many times without any manual intervention. The best 8 Java UI Testing Open Source Projects are the following including axe-core - Accessibility engine for automated Web UI testing; UI Recorder - a multiplatform UI test recorder; tuneup_js - JavaScript library to ease automated iOS UI testing; juni | Unidata UI testing framework and tests.

UI (user interface) testing is a methodology that is used on an application's user interface to ensure that it can correctly respond to certain actions, like clicking buttons or filling out forms. It is often used in tandem with unit testing. UIT libraries are used to test C++ applications' UIs. These libraries are a set of classes and methods that support executing a test on an application's UI. If you're new to C++ UI Testing Open Source libraries then this list will show you how to get started with some of the most popular ones out there today. spix - UI test automation library for QtQuick/QML Apps; Cell - OpenGL C Graphics Engine; Mezz_Test - Testing Tools used in the Mezzanine; SkyUnit - a Testing Framework for Skyrim.

UI testing of an application is a process that verifies the interface and functionality of an application. UI testing is done by a human or by using automated tools. UI testing is a great way to validate whether your app is working as expected. It's a good complement to unit tests because it tests the full integration of your web application It can be difficult to accurately test behavior across multiple browsers and platforms. You can use PHP UI Testing Open Source libraries to help with this process. The following are 6 PHP UI Testing Open Source libraries in 2022: VisualPHPUnit - VisualPHPUnit is a visual frontend for PHPUnit; Phpunit-ui - unit tests from your browser instead; php_codeception - Automated UI/API testing with Codeception.

When testing software-based products, UI testing is just as important as unit testing. Both types of testing allow the tester to evaluate an application as a whole rather than evaluate individual components. It is possible to do this using C# UI testing frameworks. A C# UI testing framework provides classes and methods for executing tests that verify not only the parts but also the user interface of an application. It can be difficult to accurately test behavior across multiple browsers and platforms. You can use C# UI Testing Open Source libraries to help with this process. EasyRepro - Automated UI testing API for Dynamics 365; unity-uitest - Unity UI Test Automation Framework; Tellerium - A utility pack to create maintainable UI tests using Selenium with additional support for ASP.NET MVC projects.

Go is one of the most widely used languages in the world, powering everything from websites and web applications to enterprise software and mobile apps. As such, it's very important that you have a way to ensure that your code works as intended. User interface testing is a methodology that is used on an application's user interface to ensure that it can correctly respond to certain actions, like clicking buttons or filling out forms. This Go UI Testing Open Source libraries then this list will show you how to get started with some of the most popular ones out there today fortio - Fortio load testing library, command line tool; mmock - HTTP mocking application for testing and fast prototyping; go-glint - Componentbased UIframework for commandline tools.

Ruby is one of the most widely used languages in the world, powering everything from websites and web applications to enterprise software and mobile apps. As such, it's very important that you have a way to ensure that your code works as intended. UI testing is a great way to validate whether your app is working as expected. It's a good complement to unit tests, because it tests the full integration of your web application. If you're new to Ruby UI Testing Open Source libraries then this list will show you how to get started with some of the most popular ones out there today. green_onion - UI testing/screenshot diffing tool; oz - behavioral webui testing framework developed; AutoMate - a framework containing a set of helpful XCTest extensions for writing UI automation tests.

Trending Discussions on UI Testing

unknown error: DevToolsActivePort file doesn't exist launching ChromeDriver using robot framework with headless in Docker

if else case in Android Espresso UI testing

How to retrieve a random value from an array that has values separate by a new line

Junit5 Cucumber "No definition found for..." in .feature file

What is this implemention? Android

Android: How to perform click action on EditTextPreference using Espresso

TouchGFX gui automated testing

Selenium Microsoft Login “Your browser is a bit unusual…” Message

Returning Conditional Responses from MockedWebService in Swift

iOS UI Testing cannot see the UILabel

QUESTION

unknown error: DevToolsActivePort file doesn't exist launching ChromeDriver using robot framework with headless in Docker

Asked 2022-Apr-01 at 09:28

I have robot framework which will try to run the UI testing in headless mode. But when we run the robot framework inside Docker container, we got the below error

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Dockerfile:

1FROM python:3.8
2
3ENV JAVA_OPTS "-Dlog4j.formatMsgNoLookups=true"
4ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true
5ENV WAIT_VERSION 2.7.2
6
7#Install Google Chrome
8RUN echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
9RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
10RUN set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
11
12#Install Chrome Driver
13RUN BROWSER_MAJOR=$(google-chrome --version | sed 's/Google Chrome \([0-9]*\).*/\1/g') && \
14    wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${BROWSER_MAJOR} -O chrome_version && \
15    wget https://chromedriver.storage.googleapis.com/`cat chrome_version`/chromedriver_linux64.zip && \ 
16    unzip chromedriver_linux64.zip && \
17    mv chromedriver /usr/local/bin/
18
19ADD https://github.com/ufoscout/docker-compose-wait/releases/download/$WAIT_VERSION/wait /wait
20RUN chmod +x /wait
21
22CMD ["/bin/bash"]
23

RobotFramework resource details

1FROM python:3.8
2
3ENV JAVA_OPTS "-Dlog4j.formatMsgNoLookups=true"
4ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true
5ENV WAIT_VERSION 2.7.2
6
7#Install Google Chrome
8RUN echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
9RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
10RUN set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
11
12#Install Chrome Driver
13RUN BROWSER_MAJOR=$(google-chrome --version | sed 's/Google Chrome \([0-9]*\).*/\1/g') && \
14    wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${BROWSER_MAJOR} -O chrome_version && \
15    wget https://chromedriver.storage.googleapis.com/`cat chrome_version`/chromedriver_linux64.zip && \ 
16    unzip chromedriver_linux64.zip && \
17    mv chromedriver /usr/local/bin/
18
19ADD https://github.com/ufoscout/docker-compose-wait/releases/download/$WAIT_VERSION/wait /wait
20RUN chmod +x /wait
21
22CMD ["/bin/bash"]
23##### Headless Browser ##########
24    ###### For Headless #######
25    ${chrome options} =     Evaluate    selenium.webdriver.ChromeOptions()
26    ...                     modules=selenium, selenium.webdriver
27    Call Method    ${chromeOptions}    add_experimental_option    prefs    ${prefs}
28    Call Method    ${chrome_options}   add_argument    headless
29    Call Method    ${chrome_options}   add_argument    disable-gpu
30    Call Method    ${chrome_options}   add_argument    --ignore-certificate-errors
31    ${var}=     Call Method     ${chrome_options}    to_capabilities 
32    Create Webdriver   driver_name=Chrome   alias=google   chrome_options=${chrome_options}     
33    Go To   ${environment.url}
34    Maximize Browser Window 
35

How to fix this issue?

ANSWER

Answered 2022-Apr-01 at 09:16

To get across the error:

1FROM python:3.8
2
3ENV JAVA_OPTS "-Dlog4j.formatMsgNoLookups=true"
4ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true
5ENV WAIT_VERSION 2.7.2
6
7#Install Google Chrome
8RUN echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
9RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
10RUN set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
11
12#Install Chrome Driver
13RUN BROWSER_MAJOR=$(google-chrome --version | sed 's/Google Chrome \([0-9]*\).*/\1/g') && \
14    wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${BROWSER_MAJOR} -O chrome_version && \
15    wget https://chromedriver.storage.googleapis.com/`cat chrome_version`/chromedriver_linux64.zip && \ 
16    unzip chromedriver_linux64.zip && \
17    mv chromedriver /usr/local/bin/
18
19ADD https://github.com/ufoscout/docker-compose-wait/releases/download/$WAIT_VERSION/wait /wait
20RUN chmod +x /wait
21
22CMD ["/bin/bash"]
23##### Headless Browser ##########
24    ###### For Headless #######
25    ${chrome options} =     Evaluate    selenium.webdriver.ChromeOptions()
26    ...                     modules=selenium, selenium.webdriver
27    Call Method    ${chromeOptions}    add_experimental_option    prefs    ${prefs}
28    Call Method    ${chrome_options}   add_argument    headless
29    Call Method    ${chrome_options}   add_argument    disable-gpu
30    Call Method    ${chrome_options}   add_argument    --ignore-certificate-errors
31    ${var}=     Call Method     ${chrome_options}    to_capabilities 
32    Create Webdriver   driver_name=Chrome   alias=google   chrome_options=${chrome_options}     
33    Go To   ${environment.url}
34    Maximize Browser Window 
35WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. 
36  (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
37

you can add the argument --no-sandbox as follows:

1FROM python:3.8
2
3ENV JAVA_OPTS "-Dlog4j.formatMsgNoLookups=true"
4ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true
5ENV WAIT_VERSION 2.7.2
6
7#Install Google Chrome
8RUN echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
9RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
10RUN set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
11
12#Install Chrome Driver
13RUN BROWSER_MAJOR=$(google-chrome --version | sed 's/Google Chrome \([0-9]*\).*/\1/g') && \
14    wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${BROWSER_MAJOR} -O chrome_version && \
15    wget https://chromedriver.storage.googleapis.com/`cat chrome_version`/chromedriver_linux64.zip && \ 
16    unzip chromedriver_linux64.zip && \
17    mv chromedriver /usr/local/bin/
18
19ADD https://github.com/ufoscout/docker-compose-wait/releases/download/$WAIT_VERSION/wait /wait
20RUN chmod +x /wait
21
22CMD ["/bin/bash"]
23##### Headless Browser ##########
24    ###### For Headless #######
25    ${chrome options} =     Evaluate    selenium.webdriver.ChromeOptions()
26    ...                     modules=selenium, selenium.webdriver
27    Call Method    ${chromeOptions}    add_experimental_option    prefs    ${prefs}
28    Call Method    ${chrome_options}   add_argument    headless
29    Call Method    ${chrome_options}   add_argument    disable-gpu
30    Call Method    ${chrome_options}   add_argument    --ignore-certificate-errors
31    ${var}=     Call Method     ${chrome_options}    to_capabilities 
32    Create Webdriver   driver_name=Chrome   alias=google   chrome_options=${chrome_options}     
33    Go To   ${environment.url}
34    Maximize Browser Window 
35WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. 
36  (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
37##### Headless Browser ##########
38    ###### For Headless #######
39    ${chrome options} =     Evaluate    selenium.webdriver.ChromeOptions()
40    ...                     modules=selenium, selenium.webdriver
41    Call Method    ${chromeOptions}    add_experimental_option    prefs    ${prefs}
42    Call Method    ${chrome_options}   add_argument    headless
43    Call Method    ${chrome_options}   add_argument    --no-sandbox   # newly added argument
44    Call Method    ${chrome_options}   add_argument    disable-gpu
45    Call Method    ${chrome_options}   add_argument    --ignore-certificate-errors
46    ${var}=     Call Method     ${chrome_options}    to_capabilities 
47    Create Webdriver   driver_name=Chrome   alias=google   chrome_options=${chrome_options}     
48    Go To   ${environment.url}
49    Maximize Browser Window 
50

Source https://stackoverflow.com/questions/71704028

QUESTION

if else case in Android Espresso UI testing

Asked 2022-Mar-30 at 14:46

In the application, I am writing Espresso UI test for login flow in the app. I wrote the test and it works fine, but I have one case where I have problem.

In this application, users sometimes get bonuses when opening app (usually they don't but this is let's say 1:100 scenario) In these situations, the pop up appears on the screen and my test fails because my code tries to trigger the button that is not visible (it is under the pop up).

I would like to write if-else in a test where I can for example check the visibility of the pop up close button. So if this is visible click on it and if it's not, then continue normally.

But I didn't find any if-else syntax in UI testing. Can someone with more experience in UI espresso testing help me with some advice here? THanks

ANSWER

Answered 2022-Mar-29 at 17:10

Create two tests. One where bonus popup cannot appear and one where bonus popup always appears. This way so can test both behaviours.

You should not leave anything to a chance, and your issue is exactly the example of why not.

Source https://stackoverflow.com/questions/71666138

QUESTION

How to retrieve a random value from an array that has values separate by a new line

Asked 2022-Feb-11 at 03:26

I am a complete newbie at JS and currently using it in a testing capacity along with the Karate framework to perform some UI testing. I am having the following problem:

There is a dropdown that has the following HTML:

1<select class=id="CarId" name="CarId" aria-describedby="CarId-error" aria-invalid="false" xpath="1">
2<option value="1">Mercedes</option>
3<option value="2">BMW</option>
4<option value="3">Lexus</option>
5<option value="4">Honda</option>
6<option value="5">Toyota</option>
7<option value="6">VW</option>
8</select>
9

I used the following Karate method to get all text values under the dropdown:

1<select class=id="CarId" name="CarId" aria-describedby="CarId-error" aria-invalid="false" xpath="1">
2<option value="1">Mercedes</option>
3<option value="2">BMW</option>
4<option value="3">Lexus</option>
5<option value="4">Honda</option>
6<option value="5">Toyota</option>
7<option value="6">VW</option>
8</select>
9def grabValues = scriptAll('#CarId', '_.textContent')
10

Once printed, the array look like this:

1<select class=id="CarId" name="CarId" aria-describedby="CarId-error" aria-invalid="false" xpath="1">
2<option value="1">Mercedes</option>
3<option value="2">BMW</option>
4<option value="3">Lexus</option>
5<option value="4">Honda</option>
6<option value="5">Toyota</option>
7<option value="6">VW</option>
8</select>
9def grabValues = scriptAll('#CarId', '_.textContent')
10[
11  "Mercedes\nBMW\nLexus\nHonda\nToyota\nVW\n"
12]
13
14console.log(Math.floor(Math.random() * (grabValues.length-1)))
15

When printed, it keeps giving me 0.0. I am assuming this is because the array contains new lines vs comma delimitated? If so, how can I get rid of the new lines and replace with commas?

ANSWER

Answered 2022-Feb-11 at 02:38

One line code is console.log(myArr[0].split('\n'))

OR

Let's assume : The array of String is stored in myArr

1<select class=id="CarId" name="CarId" aria-describedby="CarId-error" aria-invalid="false" xpath="1">
2<option value="1">Mercedes</option>
3<option value="2">BMW</option>
4<option value="3">Lexus</option>
5<option value="4">Honda</option>
6<option value="5">Toyota</option>
7<option value="6">VW</option>
8</select>
9def grabValues = scriptAll('#CarId', '_.textContent')
10[
11  "Mercedes\nBMW\nLexus\nHonda\nToyota\nVW\n"
12]
13
14console.log(Math.floor(Math.random() * (grabValues.length-1)))
15let myArr = ["ABC\nDEF\nGHI\nJKL\nMNO\nPQR\nSTU\nVWX\nYZA\n"]
16

To get the string from the array

1<select class=id="CarId" name="CarId" aria-describedby="CarId-error" aria-invalid="false" xpath="1">
2<option value="1">Mercedes</option>
3<option value="2">BMW</option>
4<option value="3">Lexus</option>
5<option value="4">Honda</option>
6<option value="5">Toyota</option>
7<option value="6">VW</option>
8</select>
9def grabValues = scriptAll('#CarId', '_.textContent')
10[
11  "Mercedes\nBMW\nLexus\nHonda\nToyota\nVW\n"
12]
13
14console.log(Math.floor(Math.random() * (grabValues.length-1)))
15let myArr = ["ABC\nDEF\nGHI\nJKL\nMNO\nPQR\nSTU\nVWX\nYZA\n"]
16let stringOfArr = myArr[0]
17

Storing the new array from the stringOfArr deleminated by '\n' in newArray

1<select class=id="CarId" name="CarId" aria-describedby="CarId-error" aria-invalid="false" xpath="1">
2<option value="1">Mercedes</option>
3<option value="2">BMW</option>
4<option value="3">Lexus</option>
5<option value="4">Honda</option>
6<option value="5">Toyota</option>
7<option value="6">VW</option>
8</select>
9def grabValues = scriptAll('#CarId', '_.textContent')
10[
11  "Mercedes\nBMW\nLexus\nHonda\nToyota\nVW\n"
12]
13
14console.log(Math.floor(Math.random() * (grabValues.length-1)))
15let myArr = ["ABC\nDEF\nGHI\nJKL\nMNO\nPQR\nSTU\nVWX\nYZA\n"]
16let stringOfArr = myArr[0]
17let newArray = stringOfArr.split('\n')
18
19console.log(newArray)
20

Source https://stackoverflow.com/questions/71074597

QUESTION

Junit5 Cucumber "No definition found for..." in .feature file

Asked 2022-Jan-20 at 10:24

I'm trying to create a simple Junit5-Cucumber project (in Eclipse) that would be used for UI testing.

I took reference from this repo:https://github.com/cucumber/cucumber-java-skeleton

Issue: No definition found for Open the Chrome and launch the application (error happens to the Given, When and Then statements) in the test_features.feature file.

1# test_features.feature
2Feature: Reset functionality on login page of Application
3
4    Scenario: Verification of Reset button
5    
6       Given Open the Chrome and launch the application
7        
8       When Enter the username and password
9        
10       Then Reset the credentials
11
1# test_features.feature
2Feature: Reset functionality on login page of Application
3
4    Scenario: Verification of Reset button
5    
6       Given Open the Chrome and launch the application
7        
8       When Enter the username and password
9        
10       Then Reset the credentials
11# RunCucumberTest.java
12package lpms.cucumber;
13import org.junit.platform.suite.api.ConfigurationParameter;
14import org.junit.platform.suite.api.IncludeEngines;
15import org.junit.platform.suite.api.SelectClasspathResource;
16import org.junit.platform.suite.api.Suite;
17
18import static io.cucumber.junit.platform.engine.Constants.PLUGIN_PROPERTY_NAME;
19import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME;
20
21@Suite
22@IncludeEngines("cucumber")
23@SelectClasspathResource("lpms/cucumber")
24@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
25@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "lpms.cucumber")
26public class RunCucumberTest {
27}
28
1# test_features.feature
2Feature: Reset functionality on login page of Application
3
4    Scenario: Verification of Reset button
5    
6       Given Open the Chrome and launch the application
7        
8       When Enter the username and password
9        
10       Then Reset the credentials
11# RunCucumberTest.java
12package lpms.cucumber;
13import org.junit.platform.suite.api.ConfigurationParameter;
14import org.junit.platform.suite.api.IncludeEngines;
15import org.junit.platform.suite.api.SelectClasspathResource;
16import org.junit.platform.suite.api.Suite;
17
18import static io.cucumber.junit.platform.engine.Constants.PLUGIN_PROPERTY_NAME;
19import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME;
20
21@Suite
22@IncludeEngines("cucumber")
23@SelectClasspathResource("lpms/cucumber")
24@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
25@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "lpms.cucumber")
26public class RunCucumberTest {
27}
28# StepDefinitions.java
29package lpms.cucumber;
30
31import io.cucumber.java.en.Given;
32import io.cucumber.java.en.Then;
33import io.cucumber.java.en.When;
34
35public class StepDefinitions {
36    @Given("^Open the Chrome and launch the application$")
37    public void open_the_chrome_and_launch_the_application() throws Throwable
38    {
39        System.out.println("This step opens the chrome and launches the application");      
40    }
41    
42    @When("^Enter the username and password$")
43    public void enter_the_username_and_password() throws Throwable
44    {
45        System.out.println("This step enters the username and password on the login page");     
46    }
47     
48    @Then("^Reset the credentials$")
49    public void reset_the_credential() throws Throwable
50    {
51        System.out.println("This step clicks on the reset button.");
52    }
53}
54

Project Structure

IMAGE OF MY PROJECT STRUCTURE

ANSWER

Answered 2022-Jan-20 at 10:24

Solved!

It's a warning from Eclipse IDE, likely just a bug, because I can still get testing done.

Sidenote: Extremely useful guide for learning the latest cucumber: https://cucumber.io/docs/guides/10-minute-tutorial/

Source https://stackoverflow.com/questions/70753052

QUESTION

What is this implemention? Android

Asked 2021-Dec-02 at 16:33

I've downloaded a repository from github and in the dependencies I've founded this

1dependencies {
2implementation fileTree(dir: 'libs', include: ['*.jar'])
3implementation deps.kotlin.stdlib
4implementation deps.support.app_compat
5implementation deps.support.design
6implementation deps.support.core_ktx
7implementation deps.constraint_layout
8implementation deps.arch_core.runtime
9
10// Navigation
11implementation deps.navigation.runtime_ktx
12implementation deps.navigation.fragment_ktx
13implementation deps.navigation.ui_ktx
14
15// Android Testing Support Library's runner and rules
16androidTestImplementation deps.atsl.runner
17androidTestImplementation deps.atsl.rules
18androidTestImplementation deps.room.testing
19androidTestImplementation deps.arch_core.testing
20
21// Espresso UI Testing
22androidTestImplementation deps.espresso.core
23androidTestImplementation deps.espresso.contrib
24androidTestImplementation deps.espresso.intents
25

}

So I've tried to instal those dependencies to my project but I got an error

1dependencies {
2implementation fileTree(dir: 'libs', include: ['*.jar'])
3implementation deps.kotlin.stdlib
4implementation deps.support.app_compat
5implementation deps.support.design
6implementation deps.support.core_ktx
7implementation deps.constraint_layout
8implementation deps.arch_core.runtime
9
10// Navigation
11implementation deps.navigation.runtime_ktx
12implementation deps.navigation.fragment_ktx
13implementation deps.navigation.ui_ktx
14
15// Android Testing Support Library's runner and rules
16androidTestImplementation deps.atsl.runner
17androidTestImplementation deps.atsl.rules
18androidTestImplementation deps.room.testing
19androidTestImplementation deps.arch_core.testing
20
21// Espresso UI Testing
22androidTestImplementation deps.espresso.core
23androidTestImplementation deps.espresso.contrib
24androidTestImplementation deps.espresso.intents
25A problem occurred evaluating project ':app'.
26

Could not get unknown property 'deps' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

So any ideas what this "desp" means?

ANSWER

Answered 2021-Dec-02 at 16:33

This is a way (with ExtraPropertiesExtension) to keep build.gradle files as clean as possible with an external file like a version.gradle file in which there are all dependencies and their version.

1dependencies {
2implementation fileTree(dir: 'libs', include: ['*.jar'])
3implementation deps.kotlin.stdlib
4implementation deps.support.app_compat
5implementation deps.support.design
6implementation deps.support.core_ktx
7implementation deps.constraint_layout
8implementation deps.arch_core.runtime
9
10// Navigation
11implementation deps.navigation.runtime_ktx
12implementation deps.navigation.fragment_ktx
13implementation deps.navigation.ui_ktx
14
15// Android Testing Support Library's runner and rules
16androidTestImplementation deps.atsl.runner
17androidTestImplementation deps.atsl.rules
18androidTestImplementation deps.room.testing
19androidTestImplementation deps.arch_core.testing
20
21// Espresso UI Testing
22androidTestImplementation deps.espresso.core
23androidTestImplementation deps.espresso.contrib
24androidTestImplementation deps.espresso.intents
25A problem occurred evaluating project ':app'.
26buildscript {
27    apply from: 'versions.gradle'
28    ...
29}
30

You can find this version.gradle at the root of the project. This file is applied in the ./build.gradle

The developer decided to manage his dependencies in this way but you can find many others.

This article present 3 ways to do it.

Source https://stackoverflow.com/questions/70202775

QUESTION

Android: How to perform click action on EditTextPreference using Espresso

Asked 2021-Nov-26 at 00:17

I am new at UI testing, especially using Espresso. In my use case, i need to check the if the app accepts the input text on a EditTextPreference that's inside a PreferenceScreen fragment, but before doing so i need to perform a click so that the edit dialog appears and then enter the text.

This is how the preference fragment has the edit widgets:

1<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
2    xmlns:app="http://schemas.android.com/apk/res-auto">
3
4    <EditTextPreference
5        android:key="@string/pref_stream_target_key"
6        android:title="@string/pref_stream_target_label"
7        app:useSimpleSummaryProvider="true" />
8
9    <EditTextPreference
10        android:key="@string/pref_stream_resolution_key"
11        android:title="@string/pref_stream_resolution_label"
12        app:useSimpleSummaryProvider="true" />
13
14    <EditTextPreference
15        android:key="@string/pref_stream_bitrate_key"
16        android:title="@string/pref_stream_bitrate_label"
17        app:useSimpleSummaryProvider="true" />
18
19    <EditTextPreference
20        android:key="@string/pref_stream_framerate_key"
21        android:title="@string/pref_stream_framerate_label"
22        app:useSimpleSummaryProvider="true" />
23
24    <EditTextPreference
25        android:key="@string/pref_stream_peerlatency_key"
26        android:title="@string/pref_stream_peerlatency_label"
27        app:useSimpleSummaryProvider="true" />
28
29</PreferenceScreen>
30

And this is how i've tried to perform the click

1<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
2    xmlns:app="http://schemas.android.com/apk/res-auto">
3
4    <EditTextPreference
5        android:key="@string/pref_stream_target_key"
6        android:title="@string/pref_stream_target_label"
7        app:useSimpleSummaryProvider="true" />
8
9    <EditTextPreference
10        android:key="@string/pref_stream_resolution_key"
11        android:title="@string/pref_stream_resolution_label"
12        app:useSimpleSummaryProvider="true" />
13
14    <EditTextPreference
15        android:key="@string/pref_stream_bitrate_key"
16        android:title="@string/pref_stream_bitrate_label"
17        app:useSimpleSummaryProvider="true" />
18
19    <EditTextPreference
20        android:key="@string/pref_stream_framerate_key"
21        android:title="@string/pref_stream_framerate_label"
22        app:useSimpleSummaryProvider="true" />
23
24    <EditTextPreference
25        android:key="@string/pref_stream_peerlatency_key"
26        android:title="@string/pref_stream_peerlatency_label"
27        app:useSimpleSummaryProvider="true" />
28
29</PreferenceScreen>
30with(launchFragmentInContainer<StreamSettingsFragment>()) {
31    onFragment { fragment ->
32        Espresso.onData(PreferenceMatchers.withTitle(R.string.pref_stream_target_label))
33            .perform(ViewActions.click())
34    }
35}
36

I am not sure if the action of making the click is necessary in order to check the logic behind the change listener that's in the EditTextPreference.

Running the test with this will just keep the app running and do nothing. Is there something i am missing?

EDIT: The solution for making espresso work without doing nothing was to take the code out of the onFragment block, however i am still not able to perform an action to the EditTextPreference widget.

This is the error being thrown:

1<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
2    xmlns:app="http://schemas.android.com/apk/res-auto">
3
4    <EditTextPreference
5        android:key="@string/pref_stream_target_key"
6        android:title="@string/pref_stream_target_label"
7        app:useSimpleSummaryProvider="true" />
8
9    <EditTextPreference
10        android:key="@string/pref_stream_resolution_key"
11        android:title="@string/pref_stream_resolution_label"
12        app:useSimpleSummaryProvider="true" />
13
14    <EditTextPreference
15        android:key="@string/pref_stream_bitrate_key"
16        android:title="@string/pref_stream_bitrate_label"
17        app:useSimpleSummaryProvider="true" />
18
19    <EditTextPreference
20        android:key="@string/pref_stream_framerate_key"
21        android:title="@string/pref_stream_framerate_label"
22        app:useSimpleSummaryProvider="true" />
23
24    <EditTextPreference
25        android:key="@string/pref_stream_peerlatency_key"
26        android:title="@string/pref_stream_peerlatency_label"
27        app:useSimpleSummaryProvider="true" />
28
29</PreferenceScreen>
30with(launchFragmentInContainer<StreamSettingsFragment>()) {
31    onFragment { fragment ->
32        Espresso.onData(PreferenceMatchers.withTitle(R.string.pref_stream_target_label))
33            .perform(ViewActions.click())
34    }
35}
36androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: is assignable from class <class android.widget.AdapterView>
37
38View Hierarchy:
39+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=2218, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxfill) ty=BASE_APPLICATION hwFlags=#10 isEmuiStyle=0 statusBarColor=#ff000000 navigationBarColor=#fffcfcfc wanim=0x1030001
40  fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
41|
42+->ActionBarOverlayLayout{id=16908903, res-name=decor_content_parent, visibility=VISIBLE, width=1080, height=2218, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@aa563f7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
43|
44+-->FrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@4eb0264, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=252.0, child-count=1} 
45|
46+--->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2f83982, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
47|
48+---->FrameLayout{id=16908351, res-name=list_container, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1c24893, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
49|
50+----->RecyclerView{id=2131296596, res-name=recycler_view, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@687e0d0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=5} 
51|
52+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@2746bce, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
53|
54+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3bedaef, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
55|
56+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@2d239fc, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
57|
58+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@615a885, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
59|
60+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=400, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@c6f76da, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream target, input-type=0, ime-target=false, has-links=false} 
61|
62+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@848370b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
63|
64+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@506f9e8, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
65|
66+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@ade26a6, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=241.0, child-count=3} 
67|
68+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@ac138e7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
69|
70+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@d45cc94, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
71|
72+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@985633d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
73|
74+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=539, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@360732, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream Resolution, input-type=0, ime-target=false, has-links=false} 
75|
76+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@fde7c83, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
77|
78+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@bfd1e00, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
79|
80+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@eb9647e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=482.0, child-count=3} 
81|
82+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@9025ddf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
83|
84+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@8161a2c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
85|
86+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@76abcf5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
87|
88+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=420, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@8834a8a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream Bitrate, input-type=0, ime-target=false, has-links=false} 
89|
90+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@158f8fb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
91|
92+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@be0ad18, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
93|
94+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@4538556, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=723.0, child-count=3} 
95|
96+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@b429d7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
97|
98+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@4bf82c4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
99|
100+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@6fa95ad, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
101|
102+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=514, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@31aa0e2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream framerate, input-type=0, ime-target=false, has-links=false} 
103|
104+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@278c73, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
105|
106+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1940730, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
107|
108+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@245e92e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=964.0, child-count=3} 
109|
110+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@c647ccf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
111|
112+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@bea665c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
113|
114+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@525cd65, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
115|
116+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=761, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@6cb6a3a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream peer latency (SRT), input-type=0, ime-target=false, has-links=false} 
117|
118+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@1d616eb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
119|
120+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@7e58c48, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
121|
122+---->TextView{id=16908292, res-name=empty, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@52adae1, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
123|
124+-->ActionBarContainer{id=16908719, res-name=action_bar_container, visibility=VISIBLE, width=1080, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@e7d36c7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=108.0, child-count=2} 
125|
126+--->ActionBarView{id=16908718, res-name=action_bar, visibility=VISIBLE, width=1080, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@6eb24f4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
127|
128+---->LinearLayout{id=-1, visibility=VISIBLE, width=620, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=false, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.app.ActionBar$LayoutParams@19441d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=24.0, y=0.0, child-count=2} 
129|
130+----->HomeView{id=-1, visibility=VISIBLE, width=120, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@8f10692, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
131|
132+------>ImageView{id=16909572, res-name=up, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@58c7863, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} 
133|
134+------>ImageView{id=16908332, res-name=home, visibility=VISIBLE, width=96, height=96, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@90f9c60, tag=null, root-is-layout-requested=false, has-input-connection=false, x=12.0, y=24.0} 
135|
136+----->LinearLayout{id=-1, visibility=VISIBLE, width=500, height=73, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@414f9de, tag=null, root-is-layout-requested=false, has-input-connection=false, x=120.0, y=35.0, child-count=2} 
137|
138+------>TextView{id=16908722, res-name=action_bar_title, visibility=VISIBLE, width=476, height=73, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@c437bf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Genius Live Camera, input-type=0, ime-target=false, has-links=false} 
139|
140+------>TextView{id=16908721, res-name=action_bar_subtitle, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@9421e8c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
141|
142+---->ActionMenuView{id=-1, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.view.ViewGroup$LayoutParams@2bdd9d5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=1080.0, y=72.0, child-count=0} 
143|
144+--->ActionBarContextView{id=16908723, res-name=action_context_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2f2d5ea, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
145|
146+-->ActionBarContainer{id=16909433, res-name=split_action_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@b8e90db, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
147    at dalvik.system.VMStack.getThreadStackTrace(Native Method)
148    at java.lang.Thread.getStackTrace(Thread.java:1730)
149    at androidx.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:12)
150    at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:7)
151    at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:8)
152    at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:11)
153    at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:4)
154    at androidx.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:1)
155    at androidx.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:2)
156    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:7)
157    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:13)
158    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.displayDataMatcher(DataInteraction.java:1)
159    at androidx.test.espresso.DataInteraction.makeTargetMatcher(DataInteraction.java:2)
160    at androidx.test.espresso.DataInteraction.perform(DataInteraction.java:1)
161    at com.domain.division.app.fragment.StreamSettingsFragmentTest.validTarget(StreamSettingsFragmentTest.kt:27)
162

ANSWER

Answered 2021-Nov-26 at 00:17

Remove the onFragment bit - that's so you can directly interact with the Fragment in a synchronized fashion on the main thread. Espresso is designed to work on the test thread and handles synchronizing with the UI on its own:

1<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
2    xmlns:app="http://schemas.android.com/apk/res-auto">
3
4    <EditTextPreference
5        android:key="@string/pref_stream_target_key"
6        android:title="@string/pref_stream_target_label"
7        app:useSimpleSummaryProvider="true" />
8
9    <EditTextPreference
10        android:key="@string/pref_stream_resolution_key"
11        android:title="@string/pref_stream_resolution_label"
12        app:useSimpleSummaryProvider="true" />
13
14    <EditTextPreference
15        android:key="@string/pref_stream_bitrate_key"
16        android:title="@string/pref_stream_bitrate_label"
17        app:useSimpleSummaryProvider="true" />
18
19    <EditTextPreference
20        android:key="@string/pref_stream_framerate_key"
21        android:title="@string/pref_stream_framerate_label"
22        app:useSimpleSummaryProvider="true" />
23
24    <EditTextPreference
25        android:key="@string/pref_stream_peerlatency_key"
26        android:title="@string/pref_stream_peerlatency_label"
27        app:useSimpleSummaryProvider="true" />
28
29</PreferenceScreen>
30with(launchFragmentInContainer<StreamSettingsFragment>()) {
31    onFragment { fragment ->
32        Espresso.onData(PreferenceMatchers.withTitle(R.string.pref_stream_target_label))
33            .perform(ViewActions.click())
34    }
35}
36androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: is assignable from class <class android.widget.AdapterView>
37
38View Hierarchy:
39+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=2218, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxfill) ty=BASE_APPLICATION hwFlags=#10 isEmuiStyle=0 statusBarColor=#ff000000 navigationBarColor=#fffcfcfc wanim=0x1030001
40  fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
41|
42+->ActionBarOverlayLayout{id=16908903, res-name=decor_content_parent, visibility=VISIBLE, width=1080, height=2218, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@aa563f7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
43|
44+-->FrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@4eb0264, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=252.0, child-count=1} 
45|
46+--->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2f83982, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
47|
48+---->FrameLayout{id=16908351, res-name=list_container, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1c24893, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
49|
50+----->RecyclerView{id=2131296596, res-name=recycler_view, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@687e0d0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=5} 
51|
52+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@2746bce, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
53|
54+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3bedaef, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
55|
56+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@2d239fc, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
57|
58+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@615a885, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
59|
60+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=400, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@c6f76da, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream target, input-type=0, ime-target=false, has-links=false} 
61|
62+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@848370b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
63|
64+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@506f9e8, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
65|
66+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@ade26a6, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=241.0, child-count=3} 
67|
68+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@ac138e7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
69|
70+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@d45cc94, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
71|
72+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@985633d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
73|
74+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=539, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@360732, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream Resolution, input-type=0, ime-target=false, has-links=false} 
75|
76+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@fde7c83, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
77|
78+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@bfd1e00, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
79|
80+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@eb9647e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=482.0, child-count=3} 
81|
82+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@9025ddf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
83|
84+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@8161a2c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
85|
86+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@76abcf5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
87|
88+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=420, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@8834a8a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream Bitrate, input-type=0, ime-target=false, has-links=false} 
89|
90+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@158f8fb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
91|
92+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@be0ad18, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
93|
94+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@4538556, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=723.0, child-count=3} 
95|
96+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@b429d7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
97|
98+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@4bf82c4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
99|
100+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@6fa95ad, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
101|
102+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=514, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@31aa0e2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream framerate, input-type=0, ime-target=false, has-links=false} 
103|
104+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@278c73, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
105|
106+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1940730, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
107|
108+------>LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@245e92e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=964.0, child-count=3} 
109|
110+------->LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@c647ccf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
111|
112+-------->PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@bea665c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
113|
114+------->RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@525cd65, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
115|
116+-------->TextView{id=16908310, res-name=title, visibility=VISIBLE, width=761, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@6cb6a3a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream peer latency (SRT), input-type=0, ime-target=false, has-links=false} 
117|
118+-------->TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@1d616eb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
119|
120+------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@7e58c48, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
121|
122+---->TextView{id=16908292, res-name=empty, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@52adae1, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
123|
124+-->ActionBarContainer{id=16908719, res-name=action_bar_container, visibility=VISIBLE, width=1080, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@e7d36c7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=108.0, child-count=2} 
125|
126+--->ActionBarView{id=16908718, res-name=action_bar, visibility=VISIBLE, width=1080, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@6eb24f4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
127|
128+---->LinearLayout{id=-1, visibility=VISIBLE, width=620, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=false, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.app.ActionBar$LayoutParams@19441d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=24.0, y=0.0, child-count=2} 
129|
130+----->HomeView{id=-1, visibility=VISIBLE, width=120, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@8f10692, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
131|
132+------>ImageView{id=16909572, res-name=up, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@58c7863, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} 
133|
134+------>ImageView{id=16908332, res-name=home, visibility=VISIBLE, width=96, height=96, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@90f9c60, tag=null, root-is-layout-requested=false, has-input-connection=false, x=12.0, y=24.0} 
135|
136+----->LinearLayout{id=-1, visibility=VISIBLE, width=500, height=73, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@414f9de, tag=null, root-is-layout-requested=false, has-input-connection=false, x=120.0, y=35.0, child-count=2} 
137|
138+------>TextView{id=16908722, res-name=action_bar_title, visibility=VISIBLE, width=476, height=73, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@c437bf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Genius Live Camera, input-type=0, ime-target=false, has-links=false} 
139|
140+------>TextView{id=16908721, res-name=action_bar_subtitle, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@9421e8c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
141|
142+---->ActionMenuView{id=-1, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.view.ViewGroup$LayoutParams@2bdd9d5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=1080.0, y=72.0, child-count=0} 
143|
144+--->ActionBarContextView{id=16908723, res-name=action_context_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2f2d5ea, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
145|
146+-->ActionBarContainer{id=16909433, res-name=split_action_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@b8e90db, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
147    at dalvik.system.VMStack.getThreadStackTrace(Native Method)
148    at java.lang.Thread.getStackTrace(Thread.java:1730)
149    at androidx.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:12)
150    at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:7)
151    at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:8)
152    at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:11)
153    at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:4)
154    at androidx.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:1)
155    at androidx.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:2)
156    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:7)
157    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:13)
158    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.displayDataMatcher(DataInteraction.java:1)
159    at androidx.test.espresso.DataInteraction.makeTargetMatcher(DataInteraction.java:2)
160    at androidx.test.espresso.DataInteraction.perform(DataInteraction.java:1)
161    at com.domain.division.app.fragment.StreamSettingsFragmentTest.validTarget(StreamSettingsFragmentTest.kt:27)
162launchFragmentInContainer<StreamSettingsFragment>()
163
164onData(withTitle(R.string.pref_stream_target_label)).perform(ViewActions.click())
165

EDIT

OK, so now you get No views in hierarchy found matching: is assignable from class <class android.widget.AdapterView> . What does this mean? It means onData attempted to find an object in an AdapterView (like a ListView) but one wasn't found.

OK, so why not? Look at the error report and you will see:

1&lt;PreferenceScreen xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
2    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;&gt;
3
4    &lt;EditTextPreference
5        android:key=&quot;@string/pref_stream_target_key&quot;
6        android:title=&quot;@string/pref_stream_target_label&quot;
7        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
8
9    &lt;EditTextPreference
10        android:key=&quot;@string/pref_stream_resolution_key&quot;
11        android:title=&quot;@string/pref_stream_resolution_label&quot;
12        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
13
14    &lt;EditTextPreference
15        android:key=&quot;@string/pref_stream_bitrate_key&quot;
16        android:title=&quot;@string/pref_stream_bitrate_label&quot;
17        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
18
19    &lt;EditTextPreference
20        android:key=&quot;@string/pref_stream_framerate_key&quot;
21        android:title=&quot;@string/pref_stream_framerate_label&quot;
22        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
23
24    &lt;EditTextPreference
25        android:key=&quot;@string/pref_stream_peerlatency_key&quot;
26        android:title=&quot;@string/pref_stream_peerlatency_label&quot;
27        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
28
29&lt;/PreferenceScreen&gt;
30with(launchFragmentInContainer&lt;StreamSettingsFragment&gt;()) {
31    onFragment { fragment -&gt;
32        Espresso.onData(PreferenceMatchers.withTitle(R.string.pref_stream_target_label))
33            .perform(ViewActions.click())
34    }
35}
36androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: is assignable from class &lt;class android.widget.AdapterView&gt;
37
38View Hierarchy:
39+&gt;DecorView{id=-1, visibility=VISIBLE, width=1080, height=2218, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxfill) ty=BASE_APPLICATION hwFlags=#10 isEmuiStyle=0 statusBarColor=#ff000000 navigationBarColor=#fffcfcfc wanim=0x1030001
40  fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
41|
42+-&gt;ActionBarOverlayLayout{id=16908903, res-name=decor_content_parent, visibility=VISIBLE, width=1080, height=2218, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@aa563f7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
43|
44+--&gt;FrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@4eb0264, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=252.0, child-count=1} 
45|
46+---&gt;LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2f83982, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
47|
48+----&gt;FrameLayout{id=16908351, res-name=list_container, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1c24893, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
49|
50+-----&gt;RecyclerView{id=2131296596, res-name=recycler_view, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@687e0d0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=5} 
51|
52+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@2746bce, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
53|
54+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3bedaef, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
55|
56+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@2d239fc, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
57|
58+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@615a885, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
59|
60+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=400, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@c6f76da, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream target, input-type=0, ime-target=false, has-links=false} 
61|
62+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@848370b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
63|
64+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@506f9e8, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
65|
66+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@ade26a6, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=241.0, child-count=3} 
67|
68+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@ac138e7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
69|
70+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@d45cc94, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
71|
72+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@985633d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
73|
74+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=539, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@360732, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream Resolution, input-type=0, ime-target=false, has-links=false} 
75|
76+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@fde7c83, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
77|
78+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@bfd1e00, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
79|
80+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@eb9647e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=482.0, child-count=3} 
81|
82+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@9025ddf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
83|
84+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@8161a2c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
85|
86+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@76abcf5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
87|
88+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=420, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@8834a8a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream Bitrate, input-type=0, ime-target=false, has-links=false} 
89|
90+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@158f8fb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
91|
92+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@be0ad18, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
93|
94+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@4538556, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=723.0, child-count=3} 
95|
96+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@b429d7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
97|
98+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@4bf82c4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
99|
100+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@6fa95ad, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
101|
102+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=514, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@31aa0e2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream framerate, input-type=0, ime-target=false, has-links=false} 
103|
104+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@278c73, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
105|
106+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1940730, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
107|
108+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@245e92e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=964.0, child-count=3} 
109|
110+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@c647ccf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
111|
112+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@bea665c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
113|
114+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@525cd65, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
115|
116+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=761, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@6cb6a3a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream peer latency (SRT), input-type=0, ime-target=false, has-links=false} 
117|
118+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@1d616eb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
119|
120+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@7e58c48, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
121|
122+----&gt;TextView{id=16908292, res-name=empty, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@52adae1, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
123|
124+--&gt;ActionBarContainer{id=16908719, res-name=action_bar_container, visibility=VISIBLE, width=1080, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@e7d36c7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=108.0, child-count=2} 
125|
126+---&gt;ActionBarView{id=16908718, res-name=action_bar, visibility=VISIBLE, width=1080, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@6eb24f4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
127|
128+----&gt;LinearLayout{id=-1, visibility=VISIBLE, width=620, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=false, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.app.ActionBar$LayoutParams@19441d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=24.0, y=0.0, child-count=2} 
129|
130+-----&gt;HomeView{id=-1, visibility=VISIBLE, width=120, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@8f10692, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
131|
132+------&gt;ImageView{id=16909572, res-name=up, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@58c7863, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} 
133|
134+------&gt;ImageView{id=16908332, res-name=home, visibility=VISIBLE, width=96, height=96, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@90f9c60, tag=null, root-is-layout-requested=false, has-input-connection=false, x=12.0, y=24.0} 
135|
136+-----&gt;LinearLayout{id=-1, visibility=VISIBLE, width=500, height=73, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@414f9de, tag=null, root-is-layout-requested=false, has-input-connection=false, x=120.0, y=35.0, child-count=2} 
137|
138+------&gt;TextView{id=16908722, res-name=action_bar_title, visibility=VISIBLE, width=476, height=73, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@c437bf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Genius Live Camera, input-type=0, ime-target=false, has-links=false} 
139|
140+------&gt;TextView{id=16908721, res-name=action_bar_subtitle, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@9421e8c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
141|
142+----&gt;ActionMenuView{id=-1, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.view.ViewGroup$LayoutParams@2bdd9d5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=1080.0, y=72.0, child-count=0} 
143|
144+---&gt;ActionBarContextView{id=16908723, res-name=action_context_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2f2d5ea, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
145|
146+--&gt;ActionBarContainer{id=16909433, res-name=split_action_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@b8e90db, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
147    at dalvik.system.VMStack.getThreadStackTrace(Native Method)
148    at java.lang.Thread.getStackTrace(Thread.java:1730)
149    at androidx.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:12)
150    at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:7)
151    at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:8)
152    at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:11)
153    at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:4)
154    at androidx.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:1)
155    at androidx.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:2)
156    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.&lt;init&gt;(DataInteraction.java:7)
157    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.&lt;init&gt;(DataInteraction.java:13)
158    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.displayDataMatcher(DataInteraction.java:1)
159    at androidx.test.espresso.DataInteraction.makeTargetMatcher(DataInteraction.java:2)
160    at androidx.test.espresso.DataInteraction.perform(DataInteraction.java:1)
161    at com.domain.division.app.fragment.StreamSettingsFragmentTest.validTarget(StreamSettingsFragmentTest.kt:27)
162launchFragmentInContainer&lt;StreamSettingsFragment&gt;()
163
164onData(withTitle(R.string.pref_stream_target_label)).perform(ViewActions.click())
165+-----&gt;RecyclerView{id=2131296596, res-name=recycler_view, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@687e0d0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=5} 
166|
167+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@2746bce, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
168|
169+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3bedaef, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
170|
171+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@2d239fc, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
172

What does this mean? It means the PreferenceFragment is using a RecyclerView not a ListView for its items. As such, PreferenceMatchers and onData will not work.

OK, so then what do you do? For RecyclerViews you use RecyclerViewActions instead.

Your previous attempt might translate to something like:

1&lt;PreferenceScreen xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
2    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;&gt;
3
4    &lt;EditTextPreference
5        android:key=&quot;@string/pref_stream_target_key&quot;
6        android:title=&quot;@string/pref_stream_target_label&quot;
7        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
8
9    &lt;EditTextPreference
10        android:key=&quot;@string/pref_stream_resolution_key&quot;
11        android:title=&quot;@string/pref_stream_resolution_label&quot;
12        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
13
14    &lt;EditTextPreference
15        android:key=&quot;@string/pref_stream_bitrate_key&quot;
16        android:title=&quot;@string/pref_stream_bitrate_label&quot;
17        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
18
19    &lt;EditTextPreference
20        android:key=&quot;@string/pref_stream_framerate_key&quot;
21        android:title=&quot;@string/pref_stream_framerate_label&quot;
22        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
23
24    &lt;EditTextPreference
25        android:key=&quot;@string/pref_stream_peerlatency_key&quot;
26        android:title=&quot;@string/pref_stream_peerlatency_label&quot;
27        app:useSimpleSummaryProvider=&quot;true&quot; /&gt;
28
29&lt;/PreferenceScreen&gt;
30with(launchFragmentInContainer&lt;StreamSettingsFragment&gt;()) {
31    onFragment { fragment -&gt;
32        Espresso.onData(PreferenceMatchers.withTitle(R.string.pref_stream_target_label))
33            .perform(ViewActions.click())
34    }
35}
36androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: is assignable from class &lt;class android.widget.AdapterView&gt;
37
38View Hierarchy:
39+&gt;DecorView{id=-1, visibility=VISIBLE, width=1080, height=2218, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxfill) ty=BASE_APPLICATION hwFlags=#10 isEmuiStyle=0 statusBarColor=#ff000000 navigationBarColor=#fffcfcfc wanim=0x1030001
40  fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
41|
42+-&gt;ActionBarOverlayLayout{id=16908903, res-name=decor_content_parent, visibility=VISIBLE, width=1080, height=2218, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@aa563f7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
43|
44+--&gt;FrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@4eb0264, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=252.0, child-count=1} 
45|
46+---&gt;LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2f83982, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
47|
48+----&gt;FrameLayout{id=16908351, res-name=list_container, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1c24893, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
49|
50+-----&gt;RecyclerView{id=2131296596, res-name=recycler_view, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@687e0d0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=5} 
51|
52+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@2746bce, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
53|
54+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3bedaef, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
55|
56+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@2d239fc, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
57|
58+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@615a885, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
59|
60+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=400, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@c6f76da, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream target, input-type=0, ime-target=false, has-links=false} 
61|
62+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@848370b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
63|
64+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@506f9e8, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
65|
66+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@ade26a6, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=241.0, child-count=3} 
67|
68+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@ac138e7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
69|
70+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@d45cc94, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
71|
72+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@985633d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
73|
74+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=539, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@360732, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream Resolution, input-type=0, ime-target=false, has-links=false} 
75|
76+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@fde7c83, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
77|
78+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@bfd1e00, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
79|
80+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@eb9647e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=482.0, child-count=3} 
81|
82+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@9025ddf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
83|
84+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@8161a2c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
85|
86+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@76abcf5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
87|
88+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=420, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@8834a8a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream Bitrate, input-type=0, ime-target=false, has-links=false} 
89|
90+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@158f8fb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
91|
92+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@be0ad18, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
93|
94+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@4538556, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=723.0, child-count=3} 
95|
96+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@b429d7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
97|
98+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@4bf82c4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
99|
100+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@6fa95ad, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
101|
102+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=514, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@31aa0e2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream framerate, input-type=0, ime-target=false, has-links=false} 
103|
104+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@278c73, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
105|
106+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1940730, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
107|
108+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@245e92e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=964.0, child-count=3} 
109|
110+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@c647ccf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
111|
112+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@bea665c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
113|
114+-------&gt;RelativeLayout{id=-1, visibility=VISIBLE, width=876, height=241, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@525cd65, tag=null, root-is-layout-requested=false, has-input-connection=false, x=186.0, y=0.0, child-count=2} 
115|
116+--------&gt;TextView{id=16908310, res-name=title, visibility=VISIBLE, width=761, height=88, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@6cb6a3a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Stream peer latency (SRT), input-type=0, ime-target=false, has-links=false} 
117|
118+--------&gt;TextView{id=16908304, res-name=summary, visibility=VISIBLE, width=136, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@1d616eb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=136.0, text=Not set, input-type=0, ime-target=false, has-links=false} 
119|
120+-------&gt;LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@7e58c48, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
121|
122+----&gt;TextView{id=16908292, res-name=empty, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@52adae1, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
123|
124+--&gt;ActionBarContainer{id=16908719, res-name=action_bar_container, visibility=VISIBLE, width=1080, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@e7d36c7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=108.0, child-count=2} 
125|
126+---&gt;ActionBarView{id=16908718, res-name=action_bar, visibility=VISIBLE, width=1080, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@6eb24f4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
127|
128+----&gt;LinearLayout{id=-1, visibility=VISIBLE, width=620, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=false, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.app.ActionBar$LayoutParams@19441d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=24.0, y=0.0, child-count=2} 
129|
130+-----&gt;HomeView{id=-1, visibility=VISIBLE, width=120, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@8f10692, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
131|
132+------&gt;ImageView{id=16909572, res-name=up, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@58c7863, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} 
133|
134+------&gt;ImageView{id=16908332, res-name=home, visibility=VISIBLE, width=96, height=96, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@90f9c60, tag=null, root-is-layout-requested=false, has-input-connection=false, x=12.0, y=24.0} 
135|
136+-----&gt;LinearLayout{id=-1, visibility=VISIBLE, width=500, height=73, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@414f9de, tag=null, root-is-layout-requested=false, has-input-connection=false, x=120.0, y=35.0, child-count=2} 
137|
138+------&gt;TextView{id=16908722, res-name=action_bar_title, visibility=VISIBLE, width=476, height=73, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@c437bf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Genius Live Camera, input-type=0, ime-target=false, has-links=false} 
139|
140+------&gt;TextView{id=16908721, res-name=action_bar_subtitle, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@9421e8c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
141|
142+----&gt;ActionMenuView{id=-1, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.view.ViewGroup$LayoutParams@2bdd9d5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=1080.0, y=72.0, child-count=0} 
143|
144+---&gt;ActionBarContextView{id=16908723, res-name=action_context_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2f2d5ea, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
145|
146+--&gt;ActionBarContainer{id=16909433, res-name=split_action_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=com.android.internal.widget.ActionBarOverlayLayout$LayoutParams@b8e90db, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0} 
147    at dalvik.system.VMStack.getThreadStackTrace(Native Method)
148    at java.lang.Thread.getStackTrace(Thread.java:1730)
149    at androidx.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:12)
150    at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:7)
151    at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:8)
152    at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:11)
153    at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:4)
154    at androidx.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:1)
155    at androidx.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:2)
156    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.&lt;init&gt;(DataInteraction.java:7)
157    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.&lt;init&gt;(DataInteraction.java:13)
158    at androidx.test.espresso.DataInteraction$DisplayDataMatcher.displayDataMatcher(DataInteraction.java:1)
159    at androidx.test.espresso.DataInteraction.makeTargetMatcher(DataInteraction.java:2)
160    at androidx.test.espresso.DataInteraction.perform(DataInteraction.java:1)
161    at com.domain.division.app.fragment.StreamSettingsFragmentTest.validTarget(StreamSettingsFragmentTest.kt:27)
162launchFragmentInContainer&lt;StreamSettingsFragment&gt;()
163
164onData(withTitle(R.string.pref_stream_target_label)).perform(ViewActions.click())
165+-----&gt;RecyclerView{id=2131296596, res-name=recycler_view, visibility=VISIBLE, width=1080, height=1966, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@687e0d0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=5} 
166|
167+------&gt;LinearLayout{id=0, visibility=VISIBLE, width=1080, height=241, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.recyclerview.widget.RecyclerView$LayoutParams@2746bce, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
168|
169+-------&gt;LinearLayout{id=2131296469, res-name=icon_frame, visibility=INVISIBLE, width=168, height=24, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3bedaef, tag=null, root-is-layout-requested=false, has-input-connection=false, x=18.0, y=108.0, child-count=1} 
170|
171+--------&gt;PreferenceImageView{id=16908294, res-name=icon, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@2d239fc, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=12.0} 
172// We know the ID from the error stacktrace you were given
173onView(withId(R.id.recycler_view)) 
174    .perform(actionOnItem&lt;RecyclerView.ViewHolder&gt;(
175        // Find the preference that has &quot;target label&quot; text view as a subview
176        hasDescendant(withText(R.string.pref_stream_target_label)),
177        click() // And click it
178    ))
179

Source https://stackoverflow.com/questions/70102760

QUESTION

TouchGFX gui automated testing

Asked 2021-Nov-23 at 22:57

Checking for feasibility of automated UI testing for TouchGFX. Is there a library that helps in identifying the application window handle and use it to choose UI elements and drive the operations in each window?

ANSWER

Answered 2021-Nov-23 at 22:57

I work as part of the TouchGFX team on a daily basis.

We have a test-framework, only for internal use currently, that we plan to share with the public at some point. It uses the CubeProgrammer API to, through UnitTest++, step an application x number of times, dump the frame-buffer and do comparisons against golden images, check render times, and lots more. We use it for both framework unit tests, TouchGFX Generator tests and to test the board packages available through TouchGFX Designer.

What prevents you from performing this kind of test, currently, is that you need a HAL that isn't free-running and can take instructions from a PC source (Executing test-suites through UnitTest++, sending commands over CubeProgrammer API).

I hope we'll be able to share it soon.

Source https://stackoverflow.com/questions/70022947

QUESTION

Selenium Microsoft Login “Your browser is a bit unusual…” Message

Asked 2021-Oct-27 at 15:42

I'm trying to do some UI testing with Selenium and NUnit in C# but need to login through Microsoft first. After entering my information with selenium, when I try to click Sign-In I get a popup saying:

"Your browser is a bit unusual... Try disabling ad blockers and other extensions, enabling javascript or using a different web browser."

My best guess is that it is detecting that I'm using selenium, but I'm not sure as I can't find anyone else with a similar message. Is this what is happening? If so, is the solution described in the link my best option or is there another way to login to Microsoft?

Here is a rough example of my code:

1[TestFixture]
2public class FileUploadTests
3{
4    IWebDriver webDriver;
5
6    [OneTimeSetUp]
7    public void StartChrome()
8    {
9        var options = new ChromeOptions();
10        options.AddArgument(&quot;--enable-javascript&quot;);
11        options.AddArguments(&quot;--incognito&quot;);
12        options.AddArgument(&quot;--profile-directory=Default&quot;);
13        options.AddArgument(&quot;--disable-plugins-discovery&quot;);
14        options.AddArgument(&quot;--profile-directory=Default&quot;);
15        options.AddArgument(&quot;.&quot;);
16        webDriver = new ChromeDriver(options);
17        webDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
18    }
19
20    [Test]
21    public void Login()
22    {
23        webDriver.Navigate().GoToUrl(&quot;https://localhost:xxxxx/&quot;);
24        webDriver.FindElement(By.Id(&quot;LoginButton&quot;)).Click();
25        webDriver.FindElement(By.Id(&quot;i0116&quot;)).Clear();
26        webDriver.FindElement(By.Id(&quot;i0116&quot;)).SendKeys(&quot;username&quot;);
27        webDriver.FindElement(By.Id(&quot;i0116&quot;)).SendKeys(Keys.Enter);
28        webDriver.FindElement(By.Id(&quot;password&quot;)).Clear();
29        webDriver.FindElement(By.Id(&quot;password&quot;)).SendKeys(&quot;password&quot;);
30        System.Threading.Thread.Sleep(500);
31        webDriver.FindElement(By.Id(&quot;password&quot;)).SendKeys(Keys.Enter);
32        webDriver.FindElement(By.Id(&quot;submitBtn&quot;)).Click();
33    }
34
35    [OneTimeTearDown]
36    public void CloseTest()
37    {
38        webDriver.Close();
39        webDriver.Dispose();
40        webDriver.Quit();
41    }
42}
43

ANSWER

Answered 2021-Oct-27 at 15:42

I was able to bypass logging in by using an opened browser where I logged in manually. Still not sure what was causing the original problem though.

Source https://stackoverflow.com/questions/69258854

QUESTION

Returning Conditional Responses from MockedWebService in Swift

Asked 2021-Oct-11 at 21:12

I am implementing UI Testing and need to mock a service so I don't call the service again and again and remove the dependency on the network call. So, I created a Mock called MockWebservice. It is implemented below:

1class MockedWebservice: NetworkService {
2    
3    func login(username: String, password: String, completion: @escaping (Result&lt;LoginResponse?, NetworkError&gt;) -&gt; Void) {
4        
5            completion(.success(LoginResponse(success: true)))
6       
7    }
8}
9

It works but as you can see it always returns success: true. How can I make this MockedWebservice return a different response. The MockWebservice is injected into the main app using the launchEnvironment for unit test. Here is the code in the actual SwiftUI App which creates a real web service or a mocked version.

1class MockedWebservice: NetworkService {
2    
3    func login(username: String, password: String, completion: @escaping (Result&lt;LoginResponse?, NetworkError&gt;) -&gt; Void) {
4        
5            completion(.success(LoginResponse(success: true)))
6       
7    }
8}
9class NetworkServiceFactory {
10    
11    static func create() -&gt; NetworkService {
12        
13        let environment = ProcessInfo.processInfo.environment[&quot;ENV&quot;]
14        
15        if let environment = environment {
16            if environment == &quot;TEST&quot; {
17                return MockedWebservice()
18            } else {
19                return Webservice()
20            }
21        } else {
22            return Webservice()
23        }
24        
25    }
26    
27}
28

ANSWER

Answered 2021-Oct-11 at 21:12

Add some logic to your mocked service so that it responds differently depending on the username/password it receives

Something like:

1class MockedWebservice: NetworkService {
2    
3    func login(username: String, password: String, completion: @escaping (Result&lt;LoginResponse?, NetworkError&gt;) -&gt; Void) {
4        
5            completion(.success(LoginResponse(success: true)))
6       
7    }
8}
9class NetworkServiceFactory {
10    
11    static func create() -&gt; NetworkService {
12        
13        let environment = ProcessInfo.processInfo.environment[&quot;ENV&quot;]
14        
15        if let environment = environment {
16            if environment == &quot;TEST&quot; {
17                return MockedWebservice()
18            } else {
19                return Webservice()
20            }
21        } else {
22            return Webservice()
23        }
24        
25    }
26    
27}
28class MockedWebservice: NetworkService {
29    
30    func login(username: String, password: String, completion: @escaping (Result&lt;LoginResponse?, NetworkError&gt;) -&gt; Void) {
31        
32        if username == &quot;success&quot; {
33            completion(.success(LoginResponse(success: true)))
34        } else {
35            completion(.failure(SomeNetworkError()))
36        }
37    }
38}
39

You can test for additional username values to simulate different responses.

I would probably make the mocked method a bit more realistic. Use an asyncAfter on a utility dispatch queue to simulate network latency and the fact that your completion handler probably wont be called on the main queue.

1class MockedWebservice: NetworkService {
2    
3    func login(username: String, password: String, completion: @escaping (Result&lt;LoginResponse?, NetworkError&gt;) -&gt; Void) {
4        
5            completion(.success(LoginResponse(success: true)))
6       
7    }
8}
9class NetworkServiceFactory {
10    
11    static func create() -&gt; NetworkService {
12        
13        let environment = ProcessInfo.processInfo.environment[&quot;ENV&quot;]
14        
15        if let environment = environment {
16            if environment == &quot;TEST&quot; {
17                return MockedWebservice()
18            } else {
19                return Webservice()
20            }
21        } else {
22            return Webservice()
23        }
24        
25    }
26    
27}
28class MockedWebservice: NetworkService {
29    
30    func login(username: String, password: String, completion: @escaping (Result&lt;LoginResponse?, NetworkError&gt;) -&gt; Void) {
31        
32        if username == &quot;success&quot; {
33            completion(.success(LoginResponse(success: true)))
34        } else {
35            completion(.failure(SomeNetworkError()))
36        }
37    }
38}
39class MockedWebservice: NetworkService {
40    
41    func login(username: String, password: String, completion: @escaping (Result&lt;LoginResponse?, NetworkError&gt;) -&gt; Void) {
42        DispatchQueue.global(qos: .utility).asyncAfter(.now()+0.5) {
43            if username == &quot;success&quot; {
44                completion(.success(LoginResponse(success: true)))
45            } else {
46                completion(.failure(SomeNetworkError()))
47            }
48        }
49    }
50}
51

Source https://stackoverflow.com/questions/69532330

QUESTION

iOS UI Testing cannot see the UILabel

Asked 2021-Aug-25 at 02:01

I have a UI testing issue with some code I've got from another developer (Whose not with the project anymore). The code display a simple alert box at the top of the screen when there's an error and I cannot get my UI test to see the UILabel within it.

The structure of the box looks like this:

1UIView
2   + UILabel
3   + UIButton
4

And in the custom class for the UIView there is this code:

1UIView
2   + UILabel
3   + UIButton
4// Original code
5accessibilityIdentifier = &quot;AlertBar&quot; // Required for UI Testing.
6
7// Bits I've added trying to make messageLabel visible to UI Test
8isAccessibilityElement = true
9accessibilityElements = [messageLabel]
10messageLabel.accessibilityIdentifier = &quot;AlertBarMessage&quot;
11messageLabel.isAccessibilityElement = true
12}
13

If I breakpoint in the middle of my UI Test and dump the app into the log I can see the UIView:

1UIView
2   + UILabel
3   + UIButton
4// Original code
5accessibilityIdentifier = &quot;AlertBar&quot; // Required for UI Testing.
6
7// Bits I've added trying to make messageLabel visible to UI Test
8isAccessibilityElement = true
9accessibilityElements = [messageLabel]
10messageLabel.accessibilityIdentifier = &quot;AlertBarMessage&quot;
11messageLabel.isAccessibilityElement = true
12}
13Attributes: Application, pid: 60317, label: 'The App'
14Element subtree:
15 →Application, 0x600001df8c40, pid: 60317, label: 'The App'
16    Window (Main), 0x600001dfa060, {{0.0, 0.0}, {390.0, 844.0}}
17
18    ... app ui logged here!
19
20      Other, 0x600001dce220, {{4.0, 47.0}, {382.0, 107.7}}, identifier: 'AlertBar'
21

So it's clear that the alert is visible to XCTest, but nothing inside it. As you can tell from my added code I've been trying all sorts of things but so far I've not been able to make the UILabel (AlertBarMessage) visible.

What am I missing?

ANSWER

Answered 2021-Aug-25 at 02:01

As per usual, after typing up a stackOVerFlow question I go back to the code and figure out the problem :-) In this case it was the isAccessibilityElement = true on the view. Making it accessible was effectively hiding the nested UILabel so turning it off fixed my test.

I know there are ways in Accessibility to setup the view correctly for accessibility so that screen readers see it as a single element and can read the message, but I'll have to work on that later for now.

Source https://stackoverflow.com/questions/68915767

Community Discussions contain sources that include Stack Exchange Network

Tutorials and Learning Resources in UI Testing

Tutorials and Learning Resources are not available at this moment for UI Testing

Share this Page

share link

Get latest updates on UI Testing