MonkeyTalk Android Detect String containing \ n for the Tap button

I use MonkeyTalk to automate some custom test cases for my Android app. Everything works fine, except when I try to detect a button containing this line:

"Connect\n(Code Required)"

I get this error:

FAILURE: Unable to find Button(Connect\n(Code required))

If I changed the button to “Connect” and clicked on this value, then MonkeyTalk has no problems, but something about line breaks should be disabled.

After some searching, I found this thread that confirmed my suspicion of line breaks. Here it was suggested to fix the error in order to set the default encoding for UTF-8 (choose "Project"> "File"> "Properties"> "Resources")

However, this did not work for me.

:

"*(Code Required)"

, , .

, , ?

!

+4
3

, ? , ( ) + ( ).

: TextView

, , , #N MonkeyId, Nth.

0

javascript

app.button("buttonname").tap(x, y);
0

Use an android:contentDesxription="your_component_id"xml view file in your view or view.setContentDescription("your_component_id");directly in the view in your code to simplify access to MonkeyTalk.

0
source

Source: https://habr.com/ru/post/1536653/


All Articles