Verifying toasts using Appium , and get server reaction to button clicks - selenium

i'm new to android automation testing and i recently started to work with Appium.
I use it for android native app automation.
I have 2 question -
is there a way to verify toasts?
the latest posts i saw which referred to this issue are from the mid of 2014
and i wanted to know if there's something new in this subject before i will find another tool to run my tests with (as i understand selendroid can verify toasts).
is there a way to catch the http request which my app sends to the server when i'm pressing a button, during the automatic test?
something like a listener which works in the backround and wait for clicks?
tnx

To verify toast messages you can use one of image recognition libraries. For ruby I use RTesseract together with image processor RMgick
Idea is simple:
make toast message to appear
take few screenshots
iterate over taken screenshots and look for text
You may play with image processing, to increase recognition quality.
Here you can find code snippet which I use in my framework: link

Related

Pepper robot - Date_Dance.crg

http://doc.aldebaran.com/2-5/getting_started/samples/sample_dance1.html
Hello,
I am a newbie in Pepper Robot programming. As a programming exercise, I imported a project from Date_Dance.crg which I found from the above link, and followed the directions described in “Try it!” section.
I can run the app by pressing the green right arrow button or selecting the app from App Launcher on the tablet, however, the app cannot be triggered by any of the triggering sentences: “date dance”, “Pepper’s date dance”, “dance I’m fresh you’re pretty”, “Fresh and pretty dance”. I also tried by using Application title by saying: “start Date Dance”. However, it doesn’t work either.
Could anyone guess or explain why it fails to my voice command?
Some possibilities:
Autonomous Life isn't activated on Pepper
Autonomous Life is activated, but the robot isn't listening (blue eyes), maybe because it hasn't seen you
Pepper is just in the wrong language
Or you don't have the special dialog applauncher package that is required for that to work (it's usually installed on robots along with other apps like the tablet app launcher, but it may be missing on yours ?) - maybe do an app update, or ask whoever provided you with the robot (there can be several different configurations depending of the robot use case, though I believe most of them have the dialog applauncher)

Can i get screenshot of desktop using vuejs

i am working on tracking app using vue.js. I am a new developer.i wanna know is it possible to track mouse click and capture screenshots even if person is on desktop or any where else on browser
This has nothing to do with VueJs specifically. However, you can use HTML5/Canvas/Javascript to take a screenshot, but that's still experimental.
Take a look at this answer: Using HTML5/Canvas/JavaScript to take in-browser screenshots
i have found the solution
i followed the steps here
https://www.webrtc-experiment.com/getScreenId/
these steps allowed me the screen sharing on my webpage and then i use html to canvas to get the image of the video tag

The number of times a custom event happened is not being updated on my dashboard

I've been able to distinguish between the live build and the test build on my Android app. Everything works perfectly on the test version. I can see the live events and when I go and see the number of clicks for an event, that gets updated too. However, on the live build of my app, I can see the live events but the number of clicks is not being updated. All the events still show empty analytics. What could be wrong?
Amruta from Branch.io here:
Based on your description it looks like your App is still using the test key. If your App has both the Live and Test key added to the Manifest, and you have the debug mode enabled, your App will continue using the Test key. You should make sure that your App is using the Live key.
You can ensure that your app is using the Live key by using a Branch link from the Live version of your App. On clicking on the link, the link parameters received in the callback should have the parameter '+clicked_branch_link: true'.
If the parameter 'clicked_branch_link' is set to false it means that your App is still using the test key.
If you still continue to face issues, I would suggest writing to integrations#branch.io and they can help you resolve any issues you are facing.

How can i change the background of my App after it approved and already in App Store

I am new in Xcode and IOS development.
i have designed and finished my app and i connected with Parse for push notification and core data.
the problem is what i didn't understand is: if in future i want to change the background of my app or add new event or to change the palace of button my app, how can i do that? i have to rebuild and submit it again or there is any way to do by online a website like parse?
i couldn't find the answer any where, help please...
Thanks ,
If you had designed your app to load the background data from Parse, then you could just put the new background on Parse and your app would load it. There is no need to submit a new app to do that. If you did it this way, you'd want to have a default background in the case when the network is not available.
You can't add new code to your application with this method (that is not allowed), but you can add data such as images, text, etc. The key point here is that you have to design your app from the start to work this way, then it is simply a matter of putting the new data on Parse where your app can find it.
Expanding on #vacawama's very good answer:
For this version you are out of luck, since it sounds like you did not design it to use a background that is loaded from your Parse server.
What you need to do is to code an update to your app that has these new abilities, and submit that to the app store. Once that version is approved then you should be able to change the background from the server.

How to verify redirection to Google Play Store

Using Robotium, how do I check the redirection to Google Play Store?
Steps:
Click on a link from a listview from the test app.
Verify it redirects to Google Play Store.
I noticed that while Google Play Store is open, my test app is actually open underneath also. (I printed out all the views)
Therefore, I cannot do "assert xyz view from test app does NOT exist".
How do I check the redirection to Google Play?
Is it possible? sort of, unfortunately robotium makes it very hard to do so easily, this is because of the way that robotium tracks what the current activity is, if you was using straight instrumentation it would be as easy as having an intent filter set up before you click the view/perform action that launches the play store, then you can assert that your filter has in fact been hit (which proves that the google play store would in fact be launched if you did not have the filter).
As you are using robotium though, you cannot do this so easily as robotium has already got an intent filter up that matches everything so this means you are going to have to do some horribleness with reflection.
What you will need to do is:
Get Hold of the private member of the instrumentation class called mActivityMonitors, in this list of activity monitors you will find there is one inside of it, this will be robotiums activity monitor, save this somewhere then remove it from the list.
You will then need to add your own it will look something like to test googleplay launches (i suggest reading about Intent filters on the android api documents site)
Instrumentation inst = getInstrumentation();
IntentFilter intentFilter = new IntentFilter(Intent.ACTION_View);
ActivityMonitor monitor = inst.addMonitor(intentFilter, null, true); //true is imporant it blocks the activity from launching so that your test can continue.
assertEquals(0, monitor.getHits());
//do action that fires activity
assertEquals(1, monitor.getHits());
inst.removeMonitor(monitor);
You will now need to readd the activity monitor you removed earlier so that robotium continues to work as expected. I am not on a machine that i can actually test this all on but i have used this technique before.