ui-testing

XCUITest using Robot pattern can't print the erroneous line

落花浮王杯 提交于 2021-02-11 16:58:46
问题 I'm trying to refactor the UI test of my project to use Robot pattern. But it seems like it can't show what line in the code is the one with the error. Here's the screenshot: As you can see here, the testShowAppHealthAndBackWithoutRobot() can show the error in red line while the testShowAppHealthAndBack() doesn't. Here are the robots's code: class Robot { let app: XCUIApplication init(app: XCUIApplication) { self.app = app } func tap(_ element: XCUIElement, timeout: TimeInterval = 5) { guard

Disable/accept test storage service in Espresso

偶尔善良 提交于 2021-02-10 05:45:48
问题 As can be seen in AndroidX Test 1.3.0 alpha04 release notes: Include the test storage service in the test services Unfortunately, this makes standard connectedDebugAndroidTest to fail because this screen is getting displayed: Choose what to allow TestServices to access And this requires my interaction in order to proceed with UI testing. This makes me to hang with already quite old 1.3.0-alpha03 artifacts, although 1.3.0-beta01 is already available. Question: How to accepts this permission

Xamarin.UITesting NU1201 Error: Android 8.1 Is incompatible with .NETFramework 4.6.1

北城余情 提交于 2021-02-07 12:56:47
问题 Have been having a little issue for the last couple of days now where I will create a new Xamarin Forms project on Visual Studio 2017 and add a Xamarin.UITest Cross-Platform Test Project for unit testing I recieve a series of NU1201 Errors when I reference the .Android App in the UITest Project. Here is the exact error i get: Error NU1201 Project App1.Android is not compatible with net461 (.NETFramework,Version=v4.6.1) / win-x64. Project App1.Android supports: monoandroid81 (MonoAndroid

Xamarin.UITests - testing on real device - iOS - app permissions popups issue

拈花ヽ惹草 提交于 2021-02-07 02:48:27
问题 I've iOS app that needs some privileges (GPS, Push notifications). When app starts for a first time iOS asks user if they're ok with granting those permissions to application. I've written some UITests and want to automate running them on locally connected iPhone. The problem is that I cannot override permissions questions and my tests fails. I found out that application deployed by IDE (Xamarin Studio) will ask for permissions, but application deployed via UITests will not. So I tried with

Selenium C# How to handle Alert “Open Pick an app”?

[亡魂溺海] 提交于 2021-02-05 08:08:53
问题 I am trying to get the Alert's Text using Selenium C# for Chrome But this alert seems different from a normal JavaScript Alert, using the code below returns an error exception: string text = driver.SwitchTo().Alert().Text; OpenQA.Selenium.NoAlertPresentException: no such alert Is this considered as an alert? Is there a way to handle it? 回答1: The dialog you're seeing is shown on the OS level so there's no way for you to see that in the DOM or use Selenium to interact with it. If you really

Android UI testing: Why LiveData's observers are not being called?

柔情痞子 提交于 2021-01-29 16:17:35
问题 I have been trying, without success, to do some UI tests on Android. My app follows the MVVM architecture and uses Koin for DI. I followed this tutorial to properly set up a UI test for a Fragment with Koin, MockK and Kakao. I created the custom rule for injecting mocks, setup the ViewModel, and on the @Before call, run the expected answers and returns with MockK. The problem is that, even when the fragment's viewmodel's LiveData object is the same as the testing class's LiveData object, the

Espresso Matcher for Nested RecyclerView

落花浮王杯 提交于 2021-01-27 06:02:40
问题 So here's a breakdown of my hierarchy: RecyclerView --> LinearLayout --> RecyclerView --> FrameLayout -> FrameLayout Here's a screenshot: I would like to be able to verify the FrameLayout with the text is displayed. This what I have tried so far: onView(withRecyclerView(R.id.container_list).atPositionOnView(0, R.id.row_content)) .check(matches(withRecyclerView(R.id.row_content).atPositionOnView(0, R.id.info_field))) .check(matches(isDisplayed())); But it causes an

How to add test case grouping in Cypress

荒凉一梦 提交于 2021-01-03 09:42:23
问题 I am currently working on UI Integration tests using Cypress. I am looking for ways to add test case grouping in cypress similar to the standard TestNG. I was not able to find any grouping features in cypress documentation. I did find this post: link where grouping is done using tags. I am looking for a simpler way for test case grouping. Here is my use case: I have tests for different features like feature1,2,3 in below example and each feature has different test cases. I would like to run

How to add test case grouping in Cypress

风格不统一 提交于 2021-01-03 09:40:37
问题 I am currently working on UI Integration tests using Cypress. I am looking for ways to add test case grouping in cypress similar to the standard TestNG. I was not able to find any grouping features in cypress documentation. I did find this post: link where grouping is done using tags. I am looking for a simpler way for test case grouping. Here is my use case: I have tests for different features like feature1,2,3 in below example and each feature has different test cases. I would like to run

How to add test case grouping in Cypress

会有一股神秘感。 提交于 2021-01-03 09:39:07
问题 I am currently working on UI Integration tests using Cypress. I am looking for ways to add test case grouping in cypress similar to the standard TestNG. I was not able to find any grouping features in cypress documentation. I did find this post: link where grouping is done using tags. I am looking for a simpler way for test case grouping. Here is my use case: I have tests for different features like feature1,2,3 in below example and each feature has different test cases. I would like to run