Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#348: Add google maps interaction docs #402

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions wiki/04_How_to_write_autotests.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,18 @@ Finally, let's look at all available Test DSL in Kaspresso:
You can have a look at examples of how to [use and configure Kaspresso](../samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests)
and how to [use different forms of DSL](../samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests).

#### Google maps interaction
To interact with google maps through Kaspresso you need to define your screen like below. Please, notice that map elements and map itself are found using **withContentDescription** qualifier.
```kotlin
object MapsScreen : KScreen<MapsScreen>() {
override val layoutId: Int? = R.layout.activity_maps
override val viewClass: Class<*>? = MapsActivity::class.java

val map: UiView = UiView { withContentDescription("Sample Map Content Description") }
val marker: UiView = UiView { withContentDescription(Pattern.compile(".*Sample Marker Title.*")) }
}
```

### Sweet additional features

#### Some words about *BaseTestContext* method
Expand Down