com.personio.synthetics.step.ui.model.TargetElement.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datadog-synthetic-test-support Show documentation
Show all versions of datadog-synthetic-test-support Show documentation
Kotlin library for managing Datadog Synthetic test as code
package com.personio.synthetics.step.ui.model
import com.personio.synthetics.model.actions.LocatorType
import com.personio.synthetics.model.element.Element
import com.personio.synthetics.model.element.ElementForSpecialActions
import com.personio.synthetics.model.element.UserLocator
import com.personio.synthetics.model.element.Value
data class TargetElement(
val locator: String,
val locatorType: LocatorType = LocatorType.CSS,
) {
private fun userLocator(): UserLocator = UserLocator(values = listOf(Value(locatorType.value, locator)))
@PublishedApi
internal fun getElementObject(): Element {
return Element(userLocator = userLocator())
}
@PublishedApi
internal fun getSpecialActionsElementObject(): ElementForSpecialActions {
return ElementForSpecialActions(userLocator = userLocator())
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy