Hi there,
Can someone tell me if this is possible? I have automated to the point where the toast appears and then attempted to validate but the toast message does not appear in the structure. I have also tried adding a new action with the intent of doing some form of text compare manually but there is no obvious function to add to grab toasts.
Any help appreciated
Cheers
M
Validating toast popups on android
Re: Validating toast popups on android
Never mind, sorted it. Was on the list all the time just not where I expected it to be.
M
M
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Validating toast popups on android
Hi,
In most case you could use a generic element like
Regards,
Peter
Ranorex Team
In most case you could use a generic element like
/mobileapp[@title='yourAppTitle']//text[@caption~'ToastCaption]Just put this element to your repository and then you can use it for validation.
Regards,
Peter
Ranorex Team
Re: Validating toast popups on android
Hi,
Im facing the same issue and add a new eliment like
\mobileapp[@title='no.app.dev']//text[@caption~'Username or Password is incorrect.']
and I add the validation Like :
Action - Validate
Device Display name : AttributeContains
Match Name: Caption
Match Value : Username of Password is incorrect.
and it fails to find the toast in test run, can you please explain how can I use the validation ?
Im facing the same issue and add a new eliment like
\mobileapp[@title='no.app.dev']//text[@caption~'Username or Password is incorrect.']
and I add the validation Like :
Action - Validate
Device Display name : AttributeContains
Match Name: Caption
Match Value : Username of Password is incorrect.
and it fails to find the toast in test run, can you please explain how can I use the validation ?
Re: Validating toast popups on android
Hi,
Are you sure the validated string is exactly like this?
Could you please create and post Ranorex snapshot of your Android app with displayed popup message?
Also, what's your Ranorex version (latest is 5.4).
Are you sure the validated string is exactly like this?
Could you please create and post Ranorex snapshot of your Android app with displayed popup message?
Also, what's your Ranorex version (latest is 5.4).
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Validating toast popups on android
Hi this is to inform How I resolve the problem,
main issue was getting the correct "Path" for the toast.
to catch the toast in to ranorex spy you need to save the snap shot at the moment when toast is visible.
1) so navigate to toast event triggering window in android application
2) open ranorex spy -> right click -> save as snapshot -> give a name ( dont click save )
3) now trigger the event which is going to give a toast -> click save button at the moment toast is visible
Open and check the saved .rxsnp file, in the structure you will find a new text message element for that toast. most probably it will lay inside a new container.
main issue was getting the correct "Path" for the toast.
to catch the toast in to ranorex spy you need to save the snap shot at the moment when toast is visible.
1) so navigate to toast event triggering window in android application
2) open ranorex spy -> right click -> save as snapshot -> give a name ( dont click save )
3) now trigger the event which is going to give a toast -> click save button at the moment toast is visible
Open and check the saved .rxsnp file, in the structure you will find a new text message element for that toast. most probably it will lay inside a new container.
Re: Validating toast popups on android
Hi,
Thanks for the heads-up. Have you tried to use Instant Tracking (Ctrl+Left Win shortcut)? It's especially useful for things like popup menus and other dynamically loaded elements.
Thanks for the heads-up. Have you tried to use Instant Tracking (Ctrl+Left Win shortcut)? It's especially useful for things like popup menus and other dynamically loaded elements.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 82
- Joined: Fri Oct 24, 2014 10:58 am
- Location: Bucharest
Re: Validating toast popups on android
Hi Pavel,
For the time being, instant tracking is not working on mobile apps.
Do you have a different experience?
Regards,
For the time being, instant tracking is not working on mobile apps.
Do you have a different experience?
Regards,
Lucian Teodorescu
NetSun Software
NetSun Software
Re: Validating toast popups on android
You are probably right I somehow missed it's about "android" popups
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Validating toast popups on android
Hello sandamal,
Are you sure the adapter is text and the property is caption?
If not you can try a RanoreXPath like the following in order to find the element.
\mobileapp[@title='no.app.dev']//*[?'Username or Password is incorrect.']
I hope this helps.
Regards,
Bernhard
Are you sure the adapter is text and the property is caption?
If not you can try a RanoreXPath like the following in order to find the element.
\mobileapp[@title='no.app.dev']//*[?'Username or Password is incorrect.']
I hope this helps.
Regards,
Bernhard