How to retrieve SMS confirmation code in Appium - android-emulator

I am running tests to an app with Appium and TestNG. However, I must first log in to the app which requires an SMS confirmation code to be entered. Is there any way I can include this in my code? Some way to intercept that SMS code and enter it in the app?

Simplest solution is click on the OTP inputbox then there would be text to 'Autofill code' and make a wait till your "Verify" button says either is "enabled/checked". Then click on it and proceeds with the test .
2nd Solution would be something i found on appium discussion forum
https://discuss.appium.io/t/how-to-read-sms-from-native-messaging-app-p-e-to-read-otp/10409

Related

Google Actions rejected in review due to "Mic is open" issue

I'm having trouble submitting my Google Actions skill (this skill is Dialogflow based).
This is the message after submitting my skill.
Your Action leaves the mic open for a user command without a prompt, such as a greeting or an implicit or explicit question.
Note: Thank you for submitting your Assistant Action for review.
However, your Action has been rejected for the following:
1. Your Action violates our User Experience policy. Specifically, your Action listens for a user command by leaving the mic open without a prompt such as a greeting or an implicit or explicit question.
After the Action responds to "メニュー画面”, the mic remains open without a prompt back to the user.
For example,
User:メニュー画面
Action: *Mic is open* At this point, either prompt the user with further options or close the Action.
After reading the feedback, I understand that the phrase メニュー画面 causes the microphone issue.
I've tried to enter this phrase メニュー画面 in my Google Assistant application on iOS and my phone just opens the Setting menu without giving a defined response as I configured in Dialogflow intent.
I've tried to enter this phrase on Google actions web console in Phone mode and nothing happen and the request is empty
Empty response on Google actions
My expectation after entering this phrase: Google actions won't detect any intent that matches this phrase and the DefaultFallback intent will be triggered and Google will reply with some defined responses.
What can I do to resolve this issue? Thank you.
A cursory translation of "メニュー画面" seems to be "Menu screen".
When you're using Dialogflow, the "Default Fallback Intent" will catch any user utterance that does not match another intent. You should make sure this fallback tries to rescue the conversation by reprompting them or ending the conversation.
This means that in practice asking them a question or closing it.
Because once the Action is given this prompt, the surface will open the microphone and listen for the next user utterance. However, if the response is not a question, the user may not know to say something.
Reprompting the user can be a matter of good design or just as simple as adding something like "What do you want to do?" at the end of each response.
Alternatively, you can just mark the conversation as over. This will not reopen the microphone after its response.

Create automation test in cypress that will register user with different emails and accept registration message on user email

Until now I was using MailSlurp for this task but it has limits when using the basic plan.
Is there any other way that would solve the problem?
Test Case Steps:
Register user with random email
Go to the created email address and click the activation link sent by the app
I found the solution.
I used a small library called gmail-tester https://www.npmjs.com/package/gmail-tester, and it does its job perfectly.
I've had a problem with configuring it but in the end, it's working.
I can check now has user received an email, and assert the content of the emails.
You can use faker to generate a random word and then just add that word to the end of your email with a + it would look something like this
cy.get('someElement').type(`something+${faker.random.words(1)}#example.com`);
Then you can just navigate to your own email address and click the link from there. The only issue you are going to have is that you wont be able to do this all is the same test case as cypress does not support cross browser testing.
Also Im not sure if the activation link redirects you or not, but if it does you wont be able to navigate to that link either.
Here is an awesome article showing how you can use MailTrap to do this:
https://humble.dev/testing-an-email-workflow-from-end-to-end-with-cypress

User interaction with IFTTT

I'm a newbie when it comes to IFTTT...
The following I accomplished: "When arriving at a certain location turn on a Smart Life device X "
Now I want to refine this to "When arriving at a certain location show a dialog to the user asking to turn on a Smart Life device yes/no" . If user answers Yes then turn it on.
The IFTTT app can eg show a dialog like : you entered this region, but I don't find a way to let the user choose an option and act on that.
Anyone has an idea on how to accomplish this
Big TIA
It seems not possible at this time with IFTTT alone...
I found a workaround with the Shortcuts on iOS:
I run the geofencing in Shortcuts app
show an alert
if the user answers yes I trigger an IFTTT Webhook performing the task by opening the Webhook URL from Shortcuts.

Missing Authorization in Google form submission

I have google apps of form, when response save in spreadsheet, it activate a script to send an email to a user. After running 4 months, today I got an error message through script response:
Details:
Start Function Error Message Trigger End
11/10/16 10:49 AM formSubmitReply Authorization is required to perform that action. formSubmit 11/10/16 10:49 AM
I checked "Connected apps & sites" of "sign-in & security" of "My Account" in google. It registers 7 my apps but not the error apps.
So, I want to ask how I can activate the missing apps in authorization list.
Thanks in advance.
I had this one yesterday. I opened the faulty script in the script editor and executed it with the Run (play button) command. Don't forget to choose the function name in the drop down list on the right or it will be greyed out.
Then it asked for permissions, after granted everything was alright again.

"Send via Phone Call" button grayed out / disabled while trying to register for Facebook developer account

I am trying to register for a Facebook developer account. So I went to developers.facebook.com and then tried to go through the registration process. During the steps, facebook requires me to provide my phone number in order to receive a confirmation code for registration. A dialog box shows up and I enter my phone number in it. But even after I do this, I am unable to click on "Send via Phone Call" button because it is grayed out / disabled as shown below. Please note that I have just put a fake phone number for the image here, but the button won't enable in spite of my putting my real phone number.
All I could do is click on "Send as Text". But the problem with that is the fact my phone can't receive text messages. So I am stuck, because I can't click on the "Send via Phone Call" and receive a call on my phone for the confirmation code.
Could someone please let me know how I get around this and complete the registration process for the developer account? Either having a way to enable the "Send via Phone Call" button or having a way to register without a phone number or another way that I am not aware of would be good.
Thanks.
I think the original comment by Tzar deserves to be an answer as its 2016 and still, works:
Short story:
The Send via phone call button is greyed out and disabled, but the functionality exists. Facebook just made a lazy/temp/quickfix by just disabling the control, not removing the functionality. What that means is if you can simply enable the button, it will work. So we need to tamper with that html.
Solution:
Do an inspect element with your browser on that button, and simply remove the disabled="1" property. Here is the tricky part: the button will remain greyed-out but it will be clickable, and i can confirm it just worked for me.