Katalon Mobile OTP

  Рет қаралды 2,946

Mohammad Mosaj Gohar

Mohammad Mosaj Gohar

Күн бұрын

Пікірлер: 25
@ruchikapal9445
@ruchikapal9445 Жыл бұрын
how you have taken otp from mobile , have you install some app in laptop to connect you mobile?
@tinasaxena9348
@tinasaxena9348 Жыл бұрын
Hello please gudie how to set up mobile device in katalon for sms?
@arpitmalaiya7425
@arpitmalaiya7425 3 жыл бұрын
HI mosaj,can you explain in detail how you have done all the things , i didnt get how you have done integration
@mosajg1
@mosajg1 3 жыл бұрын
Pls share your email id
@hemasreevayyala8742
@hemasreevayyala8742 2 жыл бұрын
Hi Mosaj, How you are able write mobile and web code in the same project?
@armshow7394
@armshow7394 5 жыл бұрын
May I ask some ? How to get form real device ?
@mosajg1
@mosajg1 5 жыл бұрын
Arm Show this video sample is reading OTP from real physical device only .
@mosajg1
@mosajg1 5 жыл бұрын
Arm Show let me know if you are looking for end to end setup or the code?
@mosajg1
@mosajg1 5 жыл бұрын
can please elaboarte ur question. if u r looking for earl device simulation, then my example is for real device only. the device that u see in video is the image of my real device only.
@xunchii
@xunchii 5 жыл бұрын
Hi Mosaj, Can have the code for this setup?
@mosajg1
@mosajg1 5 жыл бұрын
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase import static com.kms.katalon.core.testdata.TestDataFactory.findTestData import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile import com.kms.katalon.core.model.FailureHandling as FailureHandling import com.kms.katalon.core.testcase.TestCase as TestCase import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory import com.kms.katalon.core.testdata.TestData as TestData import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository import com.kms.katalon.core.testobject.TestObject as TestObject import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI import internal.GlobalVariable as GlobalVariable import org.openqa.selenium.Keys as Keys WebUI.openBrowser('') WebUI.maximizeWindow() WebUI.navigateToUrl('internet-banking.dbs.com.sg/IB/Welcome') WebUI.click(findTestObject('MobileOTP/web/a_click here')) WebUI.setText(findTestObject('MobileOTP/web/input_UID'), findTestData('Mobile id pwd').getValue(1, 1)) WebUI.setText(findTestObject('MobileOTP/web/input_PIN'), findTestData('Mobile id pwd').getValue(1, 2)) WebUI.click(findTestObject('MobileOTP/web/button_Login')) WebUI.delay(5) WebUI.click(findTestObject('MobileOTP/web/h4_Request')) WebUI.delay(1) WebUI.click(findTestObject('MobileOTP/web/a_Manage eStatement')) WebUI.delay(5) WebUI.click(findTestObject('MobileOTP/web/a_Login with SMS')) WebUI.click(findTestObject('MobileOTP/web/a_regenerateSMSOTP')) WebUI.delay(75) WebUI.setText(findTestObject('MobileOTP/spy/input_SMSLoginPin'), findTestData('MobileOTP').getValue(1, 5)) WebUI.click(findTestObject('MobileOTP/web/button_Login (1)'))
@mosajg1
@mosajg1 5 жыл бұрын
below is second part of code
@mosajg1
@mosajg1 5 жыл бұрын
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase import static com.kms.katalon.core.testdata.TestDataFactory.findTestData import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile import com.kms.katalon.core.model.FailureHandling as FailureHandling import com.kms.katalon.core.testcase.TestCase as TestCase import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory import com.kms.katalon.core.testdata.TestData as TestData import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository import com.kms.katalon.core.testobject.TestObject as TestObject import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI import internal.GlobalVariable as GlobalVariable import java.util.regex.Matcher as Matcher import java.util.regex.Pattern as Pattern Mobile.startApplication('D:\\C Drive\\Katalon_Studio_Windows_64-4.8\\com.crazystudio.mms6.apk', false) Mobile.tap(findTestObject('MobileOTP/android.widget.RelativeLayout3'), 0) String message = Mobile.getText(findTestObject('MobileOTP/spy/android.widget.TextView2 - RM0 Enter 257106 (OTP) to access your Online Banking services. 0408 1448.'), 0, FailureHandling.CONTINUE_ON_FAILURE) Pattern p1 = Pattern.compile('RM0 Enter ([^.]*).*.\\(OTP\\) to access your Online Banking services*') Matcher m1 = p1.matcher(message) if (m1.find()) { CustomKeywords.'mobileOTP.otp.otpKey'(m1.group(1)) }
@mosajg1
@mosajg1 5 жыл бұрын
below is CustomKeyword. Now pls follow the video to put this code in custome keyword
@mosajg1
@mosajg1 5 жыл бұрын
package mobileOTP import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase import static com.kms.katalon.core.testdata.TestDataFactory.findTestData import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject import com.kms.katalon.core.annotation.Keyword import com.kms.katalon.core.checkpoint.Checkpoint import com.kms.katalon.core.checkpoint.CheckpointFactory import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords import com.kms.katalon.core.model.FailureHandling import com.kms.katalon.core.testcase.TestCase import com.kms.katalon.core.testcase.TestCaseFactory import com.kms.katalon.core.testdata.TestData import com.kms.katalon.core.testdata.TestDataFactory import com.kms.katalon.core.testobject.ObjectRepository import com.kms.katalon.core.testobject.TestObject import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords import internal.GlobalVariable import MobileBuiltInKeywords as Mobile import WSBuiltInKeywords as WS import WebUiBuiltInKeywords as WebUI import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class otp { @Keyword public void otpKey(String name) throws IOException{ FileInputStream fis = new FileInputStream("D:\\Testdata.xlsx"); XSSFWorkbook workbook = new XSSFWorkbook(fis); XSSFSheet sheet = workbook.getSheet("Sheet1"); int rowCount = sheet.getLastRowNum()-sheet.getFirstRowNum(); Row row = sheet.createRow(rowCount+1); Cell cell = row.createCell(0); cell.setCellType(cell.CELL_TYPE_STRING); cell.setCellValue(name); FileOutputStream fos = new FileOutputStream("D:\\Testdata.xlsx"); workbook.write(fos); fos.close(); } }
@aimieayub334
@aimieayub334 4 жыл бұрын
hi mosaj. do you have the sample otp.groovy coding? i'm trying to get otp generated from another website. I'm soo new to automation testing
@mosajg1
@mosajg1 4 жыл бұрын
Hi Aimie, my apologies saw ur msg today only. Here is the link for your request. Hope it helps and let me know if this is not what you asked for. kzbin.info/www/bejne/aYaYdnavd9Wko5I
@rajeshnaidu3280
@rajeshnaidu3280 6 жыл бұрын
Hi Plz send me code for read otp test case
@mosajg1
@mosajg1 6 жыл бұрын
Rajesh Naidu code is at 7:05(with explanation )
@rajeshnaidu3280
@rajeshnaidu3280 6 жыл бұрын
@@mosajg1 sir I'm facing one issue which is not recorded mobile steps in above android version 5.0 on katalon studio plz help me or give me mail Id
@mosajg1
@mosajg1 6 жыл бұрын
Rajesh Naidu mosajgohar@gmail.com
@mosajg1
@mosajg1 6 жыл бұрын
Drop me ur scenario explanation at mosajgohar@gmail.com
Katalon Studio | How to use Smart XPath Plugin
18:15
Automation Step by Step
Рет қаралды 10 М.
Appium : How to automate OTP Verification : Tutorial 17
21:38
Free Automation Learning
Рет қаралды 24 М.
Epic Reflex Game vs MrBeast Crew 🙈😱
00:32
Celine Dept
Рет қаралды 8 МЛН
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
Funny superhero siblings
Рет қаралды 10 МЛН
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 12 МЛН
Katalon   writing data to excel
11:01
Mohammad Mosaj Gohar
Рет қаралды 3 М.
BLCK vs RORA | MPL PH S14 REGULAR SEASON | WEEK 8 - GAME 3
23:18
ALL About MLBB
Рет қаралды 3,4 М.
Automating Multi-factor auth (MFA) based application with Katalon Studio
16:08
Katalon Studio Demo for Mobile Automation
10:29
RAUSHAN PANDEY
Рет қаралды 9 М.
TESTING AUTOMATION WEBSITE BUKALAPAK
25:10
ARF Project
Рет қаралды 7 М.
Katalon Automation Lesson - 20 | Global Variables | Local Variables | Variables | Automation
19:54
Ravikanth FicusRoot - Tech Videos
Рет қаралды 2,9 М.
Epic Reflex Game vs MrBeast Crew 🙈😱
00:32
Celine Dept
Рет қаралды 8 МЛН