testcase 1 code:
__Create booking
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.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
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.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
WebUI.openBrowser(ââ)
WebUI.navigateToUrl(ââ)
WebUI.setText(findTestObject(ârequestor bookingg/Page_Primaxis Sign in/input_Sign in_usernameâ), âR1/IMS Trialâ)
WebUI.setEncryptedText(findTestObject(ârequestor bookingg/Page_Primaxis Sign in/input_Sign in_passwordâ), âoagVfJEzz+A=â)
WebUI.click(findTestObject(ârequestor bookingg/Page_Primaxis Sign in/button_Sign inâ))
WebUI.click(findTestObject(ârequestor bookingg/Page_Interpreter Management System/span_BOOKâ))
WebUI.delay(3)
WebUI.setText(findTestObject(ârequestor bookingg/Page_Interpreter Management System/input_Search Patient by UR Numâ), âD123123â)
WebUI.delay(3)
WebUI.click(findTestObject(ârequestor bookingg/Page_Interpreter Management System/strong_1234â))
WebUI.delay(2)
WebUI.click(findTestObject(âcreate new booking as a coordinator/Page_Interpreter Management System/input_Inpatientâ))
WebUI.delay(2)
WebUI.setText(findTestObject(ârequestor bookingg/Page_Interpreter Management System/input_Dec_viewâ), â16 July 2019â)
WebUI.setText(findTestObject(ârequestor bookingg/Page_Interpreter Management System/input_Time_viewâ), â10:30â)
WebUI.delay(3)
WebUI.setText(findTestObject(ârequestor bookingg/Page_Interpreter Management System/input_WardClinicUnitâ), âwaâ)
WebUI.delay(2)
WebUI.click(findTestObject(ârequestor bookingg/Page_Interpreter Management System/strong_waâ))
WebUI.delay(2)
WebUI.selectOptionByValue(findTestObject(ârequestor bookingg/Page_Interpreter Management System/select_centerâ), â841581â,true)
WebUI.delay(3)
WebUI.setText(findTestObject(âcreate new booking as manager/Page_Interpreter Management System/input_Language_viewâ), âhindiâ)
WebUI.delay(2)
WebUI.click(findTestObject(âObject Repository/create new booking as manager/Page_Interpreter Management System/strong_Hiâ))
WebUI.setText(findTestObject(ârequestor bookingg/Page_Interpreter Management System/input_notes to interpreterâ), âcreate a bookingâ)
WebUI.delay(2)
WebUI.selectOptionByValue(findTestObject(âcreate new booking as a requestor/Page_Interpreter Management System/select-MaleFemaleâ),
âFâ, true)
WebUI.delay(3)
WebUI.selectOptionByValue(findTestObject(âcreate new booking as a requestor/Page_Interpreter Management System/select_MaleFemaleNoâ),
âFâ, true)
WebUI.click(findTestObject(ârequestor bookingg/Page_Interpreter Management System/span_Saveâ))
testcase 2 code
Submit booking
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.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
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.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
WebUI.openBrowser(ââ)
WebUI.navigateToUrl(ââ)
WebUI.setText(findTestObject(âsubmit booking as coordinator/Page_Primaxis Sign in/input_Sign in_usernameâ),
âTC0001/IMS Trialâ)
WebUI.setEncryptedText(findTestObject(âsubmit booking as coordinator/Page_Primaxis Sign in/input_Sign in_passwordâ),
âoagVfJEzz+A=â)
WebUI.click(findTestObject(âsubmit booking as coordinator/Page_Primaxis Sign in/button_Sign inâ))
WebUI.click(findTestObject(âconfirm agency booking/Page_Interpreter Management System/datespan dropdownâ))
WebUI.click(findTestObject(âPage_Interpreter Management System/li_This Monthâ))
WebUI.click(findTestObject(âsubmit booking as coordinator/Page_Interpreter Management System/button_Viewâ))
WebUI.click(findTestObject(âsubmit booking as coordinator/Page_Interpreter Management System/a_Pendingâ))
WebUI.setText(findTestObject(âsubmit booking as coordinator/Page_Interpreter Management System/input_x_bookAppDateFormattedâ),
â10â)
WebUI.click(findTestObject('submit booking as coordinator/Page_Interpreter Management System/td_TCO1-BCT48Jâ))
WebUI.click(findTestObject(âsubmit booking as coordinator/Page_Interpreter Management System/button_Select Agencyâ))
WebUI.click(findTestObject(âsubmit booking as coordinator/Page_Interpreter Management System/a_NABSâ))
WebUI.setText(findTestObject(âsubmit booking as coordinator/Page_Interpreter Management System/input_x_bookAppDateFormattedâ),
â10â)
WebUI.click(findTestObject(âsubmit booking as coordinator/Page_Interpreter Management System/td_TCO1-BCT48Jâ))
WebUI.click(findTestObject(âsubmit booking as coordinator/Page_Interpreter Management System/button_Send to Agencyâ))
WebUI.delay(2)
WebUI.click(findTestObject(âsubmit booking as coordinator/Page_Interpreter Management System/button_Proceedâ))
so this is the booking id which will be generated in testcase 1 td_TCO1-BCT48Jâ))**
it will be changing everytime
how will i get that id in the testcase 2 automatically