1

How do i verify specific text from text view in calabash android

i enter some number in text field, and there is some specific scenario in which it should be multiplied with some another number which is returned by the service. this multiplication is displayed in front of the text box where i enter number. this multiplication is displayed in text view on which i can assert the expected result ..but i have to take entire text ... i am concerned with only multiplication sign ... and not the calculation

Scenerio:

1*12=12

'1' = is the input

'* 12 = 12' = is the output in textview ... i need assertion on '*' and not on entire textview which is '*12 = 12'.

Currently i am using check_if_element_exists? ... and it works in the case of entire textview (* 12 = 12) and fails if i use it for identifying only '*'

zzz
  • 497
  • 3
  • 14
  • 32

1 Answers1

1

include? should help you with that:

Example:

my_string = '* 12 = 12'
my_string.include?('*') # true

'abc'.include?('*') # false

amrrbakry
  • 589
  • 7
  • 17