Closed automaticqa closed 4 years ago
Firstly try to define a value with
val text = getResourceString(R.string.title).substringBefore("%")
After that u can try to call
KTextView {
withText(containsText(text))
}.isDisplayed()
It does not make sense to call containsText
inside of withText
Cheers
Hi!
You should not use withText
matcher here in your case.
withText
is matcher that matches view with EXACT text provided.
As far as I understand, what you need is:
KTextView {
containsText(getResourceString(R.string.title).substringBefore("%"))
}.isDisplayed()
Great! Thank you very much!
Hey there, guys! Please tell me, how to check a substring here:
I get an exception: