Skip to content

UI Driver test in Android Studio #10

@evannico

Description

@evannico

Is there any specific set up needed to run tests against Android Studio? I have a very basic test that is able to download Android Studio and open up a project but the UI interaction doesn't work. Running the same test with IntelliJ passes.

Example test:
`@Test
fun opensToolWindow() {
val androidStudio = IdeProductProvider.AI.copy(buildNumber = "2024.3.1.13")
val intellijCommunity = IdeProductProvider.IC
val testCase = TestCase(
androidStudio,
LocalProjectInfo(Path("src/test/resources/test-projects/sample"))
)

//SETUP
val testContext = Starter.newContext(testName = "openToolWindow", testCase = testCase)

//RUN
testContext.runIdeWithDriver().useDriverAndCloseIde {
    waitForIndicators(5.minutes)
    ideFrame {
        rightToolWindowToolbar.click()
    }
}

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions