Skip to content

Latest commit

 

History

History
127 lines (94 loc) · 3.79 KB

File metadata and controls

127 lines (94 loc) · 3.79 KB

Kakao Appium

Kotlin version badge Telegram Telegram Documentation

Nice and simple DSL for Appium in Kotlin

coco

What is Kakao Appium

Kakao Appium is a concise Kotlin DSL and helper library that makes writing Appium-based UI tests easier and more readable. It brings the familiar Kakao-style API to Appium so you can assert and interact with views using Kotlin idioms.

Highlights:

  • Kotlin-first DSL with optional Java interoperability
  • Small, focused API for locating and interacting with UI elements
  • Works with Appium server
  • Support Android, iOS, Flutter appium integration

Get Started

Add dependency to your project

Gradle (module-level):

testImplementation "io.github.kakaocup:appium:<VERSION>"

Create the Kakao Screen class

class MainActivityScreen(driver: AppiumDriver? = null) : AppiumScreen<MainActivityScreen>(
    driver = driver
) {
    val increment: KWebElement = onWebElement {
        android {
            withText("Increment")
        }
    }

    val result: KWebElement = onWebElement {
        android {
            withContentDescription("clickCounter")
        }
    }
}

And simply use it in tests

@Test
    fun sampleClickAndAssert() {
        onAppiumScreen<MainActivityScreen>(driver!!) {
            result {
                isDisplayed()
                isEnabled()
                hasText("0")
                assert("0", actual = { text })
            }

            increment {
                click()
            }

            result {
                hasText("1")
            }
        }
    }

Supported Platforms

  • Android
  • iOS
  • Flutter

Create the cross platform test

val increment: KWebElement = onWebElement {
        android {
            withContentDescription("increment_description")
        }
        
        ios { 
            withId("increment_id")
        }
        
        default { 
            withText("Increment")
        }
    }

When test will be executed Kakao will select platform matcher based on provided Appium driver. It may help you to create identical testing scenarios for multiplatform projects.

How to build the examples

  • Install Appium with platform specific drivers

Android

  • Build and install the application in ./gradlew sample:installDebug directory
  • Run Appium tests from appium-test module ./gradlew appium-tests:test

iOS

Welcome PR with Examples

Flutter

Welcome PR with Examples

Contribution Policy

Kakao Appium is an open source project, and depends on its users to improve it. We are more than happy to find you interested in taking the project forward.

Kindly refer to the Contribution Guidelines for detailed information.

Code of Conduct

Please refer to Code of Conduct document.

License

Kakao Appium is open source and available under the Apache License, Version 2.0.

Thanks for supporting Open Source