android-testing

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState caused by launchFragmentInContainer

六月ゝ 毕业季﹏ 提交于 2020-06-12 05:39:26
问题 I am trying to test the app workflow. The navigation component has been used to define the app workflow. Have used FragmentScenario for testing the navigation from one fragment to another based on this reference(https://developer.android.com/guide/navigation/navigation-testing). Have added the following dependency in build.gradle debugImplementation("androidx.fragment:fragment-testing:1.1.0-beta01") { exclude group: 'androidx.test', module: 'core' } for accessing the api

Error in running flutter project which no permission

南楼画角 提交于 2020-06-11 01:03:10
问题 Launching lib/main.dart on Android SDK built for x86 in debug mode... [!] Gradle does not have execution permission. You should change the ownership of the project directory to your user, or move the project to a directory with execute permissions. Gradle task assembleDebug failed with exit code 1 Exited (sigterm) 回答1: I got the same error trying to execute flutter run on a mac. Apparently, in your flutter project, there is a file android/gradlew that is expected to be executable (and it wasn

How to Enable Internal App Sharing for Android?

本秂侑毒 提交于 2020-06-10 07:23:04
问题 I have uploaded the Android App Bundle in Play console for Alpha testing but when I open the testing URL it is showing below dialog. 回答1: Follow Below Steps to Enable Internal App Sharing Step 1: Open Play store. Step 2: Navigate to Setting. (Inside navigation drawer of play store) Step 3: Enable Developer Options. (This is similar to enabling Developer Options within the Android Settings app. Tap seven times on the Play Store Version) Step 4: Once you get the “You are now a developer!”

Espresso - How to check if one of the view is displayed

两盒软妹~` 提交于 2020-06-09 11:04:48
问题 In my test, after one action, there are two possible views which can appear and both of them are correct. How can I check if one of the view is displayed. For a single view I can check with is Displayed(). But that would fail if other view is visible instead. I want to pass the test if any one of those two views are displayed. onMyButton.perform(click()); onMyPageOne.check(matches(isDisplayed())); //view 1 or onMyPageTwo.check(matches(isDisplayed())); //view 2 After, perform click on MyButton

Android Espresso - Web browser

北城以北 提交于 2020-05-25 13:35:31
问题 I have a question I want to test whether after button click the web browser is beign launched using espresso. And the question is: is it even possible to test such thing? If so any ideas how would I do that? 回答1: Actually no. Espresso will allow you to click in the button and once the browser is fired up, the test will end. The alternative you have is having your class that fires the browser Intent mocked, so that you can test the remaining flow (if any). HAve a look in this answer:

Android Espresso - Web browser

徘徊边缘 提交于 2020-05-25 13:33:28
问题 I have a question I want to test whether after button click the web browser is beign launched using espresso. And the question is: is it even possible to test such thing? If so any ideas how would I do that? 回答1: Actually no. Espresso will allow you to click in the button and once the browser is fired up, the test will end. The alternative you have is having your class that fires the browser Intent mocked, so that you can test the remaining flow (if any). HAve a look in this answer:

Android Espresso - Web browser

这一生的挚爱 提交于 2020-05-25 13:32:15
问题 I have a question I want to test whether after button click the web browser is beign launched using espresso. And the question is: is it even possible to test such thing? If so any ideas how would I do that? 回答1: Actually no. Espresso will allow you to click in the button and once the browser is fired up, the test will end. The alternative you have is having your class that fires the browser Intent mocked, so that you can test the remaining flow (if any). HAve a look in this answer:

Best practise for testing Android Deep Links navigation into activities

有些话、适合烂在心里 提交于 2020-05-17 07:02:47
问题 I have an activity for holding a fragment. I created this for being able to run Deep Link to the profile. Also I pass PROFILE_ID as a query parameter. So the whole deep link looks this: " tigranes://home/profile?profileId=3545664 ". class ProfileActivity : BaseActivity() { companion object { @JvmStatic fun newInstance(context: Context, profileId: String): Intent { val intent = Intent(context, ProfileActivity::class.java) intent.putExtra(ProfileFragment.PROFILE_ID, profileId) return intent } }

Espresso - how to switch typeText to English or other languages input mode

故事扮演 提交于 2020-05-14 22:45:30
问题 I'm using Espresso to implement my application's autotest framework. But in some test-cases I've designed, I found my test always fail, and the root cause is not in my testing codes on feature implementation codes. The root cause is in the android input methods mode, sometimes, it's in Chinese input mode, and my input text is English, then the input value will fail. So I want to know how can I switch the current typeText input method mode from Chinese to English, or how could I ensure the

Espresso - how to switch typeText to English or other languages input mode

有些话、适合烂在心里 提交于 2020-05-14 22:44:31
问题 I'm using Espresso to implement my application's autotest framework. But in some test-cases I've designed, I found my test always fail, and the root cause is not in my testing codes on feature implementation codes. The root cause is in the android input methods mode, sometimes, it's in Chinese input mode, and my input text is English, then the input value will fail. So I want to know how can I switch the current typeText input method mode from Chinese to English, or how could I ensure the