Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / otp functionality with selenium webdriver

otp functionality with selenium webdriver

New Discussion
hitendra koshti
hitendra koshti asked on Nov 22, 2019 6:25 AM

how to test otp functionality with selenium webdriver???Any suggestion??

Sign In to post a reply

Replies

  • 0
    Vasya Kacheshmarova
    Vasya Kacheshmarova answered on Jan 13, 2016 11:40 AM

    Hello hitendra,

    Thank you for posting in our community.

    According to our support policy the testing procedures are out of the support scope. What is included in our support is Infragistics controls issue investigations, guidance for implementing customer functionalities that are not built into the Infragistics controls etc. If you are experiencing any of the these issues I would be glad to help you.

    For further reference about Infragistics Support policies could be found at the following link:

    http://pt-br.infragistics.com/support/support-policies

    Please let me know if you have any additional questions please feel free to contact me.

  • 0
    Azhar uddin
    Azhar uddin answered on Feb 21, 2018 11:55 AM

    You may try any one of them:

    Solution 1:

    Step 1: Connect the Phone/Dongle to the COM Port via USB.

    Step 2: Call the code for fetching sms via smslib.jar

    Sample Code to fetch sms:

    public void sendSMS() throws Exception{
        OutboundNotification outboundNotification = new OutboundNotification();
        SerialModemGateway gateway = new SerialModemGateway("modem.com5", "COM5", 9600, "ZTE", "COM5");
        gateway.setInbound(true);
        gateway.setOutbound(true);
        gateway.setSmscNumber("+91XXXXXXXXXX"); // 10-digit Mobile Number
        Service.getInstance().setOutboundMessageNotification(outboundNotification);
        Service.getInstance().addGateway(gateway);
        Service.getInstance().startService();
        OutboundMessage msg = new OutboundMessage(ExcelConnect.strSMSTo, ExcelConnect.strSMSText);
        Service.getInstance().sendMessage(msg);
        System.out.println(msg);
        System.out.println(ExcelConnect.strSMSTo + "-" + ExcelConnect.strSMSText);
        Service.getInstance().stopService();
        Service.getInstance().removeGateway(gateway);
    }
    

    Step 3: Parse sms to get the OTP from the fetched list by latest received sms

    .

    Solution 2:

    Step 1: Connect the android phone / iphone.

    Step 2: Automate the SMS App in either of the phone, if its android – automate SMS app via appium(or any other automating app) or if its iphone – automate its SMS app feature.

    to get the SMS and parse it to get the OTP

    .

    Solution 3:

    Step 1: Register for the HTTP SMS Gateway(Most of them provide paid API Call with very few free API Calls for testing).

    Step 2: Call the method to fetch SMS.

    Step 3: Parse the message(after sorting it by latest received sms) to get the OTP

    .

    These three ways you can get the OTP and then you can send it to you Web Application.

    .

    Solution 4:

    Get the OTP from DB, if its in-house application or if it can be accessed.

    .

    'Solution 3 and Solution 4' being most efficient and it doesn't have any dependency on sms receiving platforms.

    .

    Solutions consolidated below:

    • 0
      kinjal deshmukh
      kinjal deshmukh answered on Nov 22, 2019 6:25 AM

      What libraries to import when using solution 1?

      I tried with smslib.jar but there is no service class in it with get instance method.

      Please let us know all libraries needed.

  • 0
    surendra ms
    surendra ms answered on May 1, 2019 10:45 AM

    How to capture opt code in gmail inbox and after print in consule.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
hitendra koshti
Favorites
0
Replies
4
Created On
Nov 22, 2019
Last Post
6 years, 3 months ago

Suggested Discussions

Tags

No tags

Created by

Created on

Nov 22, 2019 6:25 AM

Last activity on

Feb 16, 2026 9:37 PM