Ask a Question

"WaitForControlWithText" only works in Legacy Mode

damkauf
Occasional Contributor

"WaitForControlWithText" only works in Legacy Mode

Hi all!

I usually test an Android mobile app that displays several Toasts messages. I am fine connecting my phone to the laptop and using the function WaitForControlWithText in Legacy Mode.

 

My question is: if I want to test this app by using BitBar instead, I'll need to change the Mobile Support type configuration from Legacy Mode to Mobile device cloud (BitBar and local Appium)... and therefore I will not be able to use the WaitForControlWithText function anymore... which is only supported in Legacy Mode.

 

How can I check for Android-Toast values when using the Mobile Support type "Mobile device cloud (BitBar and local Appium)"?

Is there any workaround?

 

Tks in advance!

BR,

Damian.-

4 REPLIES 4
damkauf
Occasional Contributor

Hi ! Tks for your answer, but I don't understand it.

On Android Studio (Java), I am actually using the Toast.makeText() method.

 

What I'm asking is if there is a workaround on the TestComplete side.

- I am currently testing by using Legacy Mode and function WaitForControlWithText.

- I would like to use Mobile device cloud (BitBar and local Appium) instead of Legacy Mode; in this scenario,the function WaitForControlWithText does not work.

- Is there a workaround to detect Android Toasts when using e Mobile device cloud (BitBar and local Appium) mode?

 

Any comments are welcome.

Thanks!

damkauf
Occasional Contributor

No BIOS settings should be changed. This answer does not make any sense... Are there some kind of automtated answers on the forum?

 

BR

 

AlexKaras
Community Hero

@damkauf :

Hi,

 

I found but did not try this post: https://stackoverflow.com/questions/30458931/how-to-test-android-toast-messages-in-appium-selenium-j...

Can you check if suggested "/hierarchy/android.widget.Toast" works with .FindElementByXPath() method and if the mentioned .getText() method exists for the found object?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
damkauf
Occasional Contributor

Hey @AlexKaras thank you for your suggestion... I can't seem to be able to hit the element "android.widget.Toast" from within the TestComplete Script, though.

 

But I guess the only way I haven't still tried is by executing a python script (Selenium) from the TestComplete Script...

 

I will post the result if I am successful.

Tks again.

BR!

cancel
Showing results for 
Search instead for 
Did you mean: