ui-testing

Wrong cells count for collection view in UI Tests

北城以北 提交于 2019-12-04 05:57:38
I have a test for a collection view that works like this: func testDeleteItem() { app.collectionViews.staticTexts["Item"].tap() app.buttons["Delete"].tap() XCTAssertEqual(app.collectionViews.cells.count, 2) XCTAssertFalse(app.collectionViews.cells.staticTexts["Item"].exists) } After the tap, there is a new screen with the delete button. When the button is tapped, the screen dismisses itself and reloads the collection view. Everything goes as expected in the UI, but I get both asserts failing. In the first count it is still 3 and in the second item it still exists. I have found the solution,

Android Espresso ListView click item

a 夏天 提交于 2019-12-04 04:45:35
I have ListView with pictures and text. When I try to click item, I get error android.support.test.espresso.AmbiguousViewMatcherException: 'with id: com.cifrasoft.telefm:id/cardsGridView' matches multiple views in the hierarchy. Problem views are marked with '****MATCHES****' below. I use the following code: onData(hasToString(startsWith("Item Text"))) .inAdapterView(withId(R.id.cardsGridView)) .perform(click()); Can I click ListView using position of Adapter , without matches or startWith ? Try with atPosition(). e.g. onData(hasToString(startsWith("Item Text"))) .inAdapterView(withId(R.id

How to test Dynamic Type (larger font sizes) in iOS Simulator

会有一股神秘感。 提交于 2019-12-03 20:01:45
问题 Changing Dynamic Type settings in iOS can be done manually (Settings > General > Accessibility > Larger Text). But this does not appear to work in the current Simulator (v9.3 at the time of writing), and doing so manually is not a solution where automation is required. Question: Is there a way to launch an app with Dynamic Type settings to launch an app with larger font sizes? Note: This is not only useful for UI testing, but also for the purpose of creating screenshots using Fastlane

Unable to get Robotium to work in Android Studio

夙愿已清 提交于 2019-12-03 08:19:41
问题 I'm struggling to get Robotium to work on the gradle-based Android Studio and I can't find the way to do it This is my build.gradle file buildscript { dependencies { repositories { mavenCentral() mavenLocal() } classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() /* maven { url "https://oss.sonatype.org/content/repositories/snapshots" }*/ } sourceSets { testLocal { java.srcDir file('src/test/java') resources.srcDir file('src/test/resources

How to start with empty Core Data for every UI Test Assertion in Swift?

假如想象 提交于 2019-12-03 07:17:11
I have an application that makes use of core data. The behavior of the application is different depending on whether that data has been populated yet. I had hoped that, before each test case, the core data would be emptied, making each test case run on a fresh app instance. Test cases shouldn't depend some test device's state, especially because other test cases manipulate this state. Unfortunately, by default, the core data lingers not only between test cases, but also between completely separate test runs. I'm trying to fix this behavior. My first idea was to dump all core data in the

Click on not fully visible imageButton with Espresso

江枫思渺然 提交于 2019-12-03 03:37:54
问题 I have a custom ImageButton that is not fully visible, by design, so when I perform a click action I get this error: android.support.test.espresso.PerformException: Error performing 'single click' on view 'with id: test.com.myproject.app:id/navigationButtonProfile'. Caused by: java.lang.RuntimeException: Action will not be performed because the target view does not match one or more of the following constraints: at least 90 percent of the view's area is displayed to the user. at android

Selenium Critique

半城伤御伤魂 提交于 2019-12-03 01:43:46
问题 I just wanted some opinions from people that have run Selenium (http://selenium.openqa.org) I have had a lot of experience with WaTiN and even wrote a recording suite for it. I had it producing some well-structured code but being only maintained by me it seems my company all but abandoned it. If you have run selenium have you had a lot of success? I will be using .NET 3.5, does Selenium work well with it? Is the code produced clean or simply a list of all the interaction? (http://blogs

Unable to get Robotium to work in Android Studio

。_饼干妹妹 提交于 2019-12-02 22:14:24
I'm struggling to get Robotium to work on the gradle-based Android Studio and I can't find the way to do it This is my build.gradle file buildscript { dependencies { repositories { mavenCentral() mavenLocal() } classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() /* maven { url "https://oss.sonatype.org/content/repositories/snapshots" }*/ } sourceSets { testLocal { java.srcDir file('src/test/java') resources.srcDir file('src/test/resources') } } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 15

Selenium Critique

对着背影说爱祢 提交于 2019-12-02 15:18:05
I just wanted some opinions from people that have run Selenium ( http://selenium.openqa.org ) I have had a lot of experience with WaTiN and even wrote a recording suite for it. I had it producing some well-structured code but being only maintained by me it seems my company all but abandoned it. If you have run selenium have you had a lot of success? I will be using .NET 3.5, does Selenium work well with it? Is the code produced clean or simply a list of all the interaction? ( http://blogs.conchango.com/richardgriffin/archive/2006/11/14/Testing-Design-Pattern-for-using-WATiR_2F00_N.aspx ) How

Automatically generate IDs on SWT-Widgets

偶尔善良 提交于 2019-12-01 18:08:29
Is there a way to automatically generate IDs on SWT-Widgets so UI-Tests can reference them? I know i can manually set an id using seData but I want to implement this feature for an existing application in a somewhat generic fashion. You can recursively assign IDs for all your shells in your application using Display.getCurrent().getShells(); and Widget.setData(); . Setting the IDs Shell []shells = Display.getCurrent().getShells(); for(Shell obj : shells) { setIds(obj); } You have access to all the active (not disposed) Shells in your application with the method Display.getCurrent().getShells()