Mate Mrse said:
Please, share the code for the two Test Cases in question:
1. Double click each of the test cases under Tests Explorer/ Test Cases (on the left hand side)
2. Click the script tab (under the test case window)
3. Copy the script and paste it here.
Testcase: Login Code
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(‘’, FailureHandling.STOP_ON_FAILURE)
WebUI.navigateToUrl(Login, FailureHandling.STOP_ON_FAILURE)
WebUI.setText(findTestObject(‘Memority_V1/Login/Page_Memority/input_Memority Connection_user’), Username)
WebUI.click(findTestObject(‘Memority_V1/Login/Page_Memority/input_Memority Connection_butt’))
WebUI.setText(findTestObject(‘Memority_V1/Login/Page_Memority/input_User Name_IDToken2’), Password)
WebUI.click(findTestObject(‘Memority_V1/Login/Page_Memority/input_User Name_Login.Submit’))
**Testcase: Create User
**
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 as Keyword
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
import org.openqa.selenium.Keys as Keys
//added to generate random string
import org.apache.commons.lang.RandomStringUtils as RandomStringUtils
import java.text.SimpleDateFormat as SimpleDateFormat
WebUI.click(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test/a_Internal’))
WebUI.waitForElementVisible(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test/a_Create an internal identity’),30)
WebUI.click(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test/a_Create an internal identity’))
/** START
The code below is to generate random string
*/
String charset = (‘A’…‘Z’)
Integer length = 5
def randomString = RandomStringUtils.random(length, charset.toCharArray())
//println(randomString)
/** END
The code below is to generate random string
*/
WebUI.setText(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_HR Identifier_USER_HR_ID’), randomString)
WebUI.selectOptionByValue(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/select_MrMrsMademoiselle’), identity_title, true)
WebUI.setText(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_Name_ManageLastName’), identity_lastname)
WebUI.setText(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_First name_ManageFirstNa’), identity_firstname)
def mydate = new Date()
formattedDate = mydate.format(‘MM/dd/yyyy’)
WebUI.setText(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_Contract starting date_V’), formattedDate)
WebUI.click(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_Department_action_Browse’))
WebUI.setText(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_Search an organization_S’), identity_organisation)
WebUI.click(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_Search an organization_a’))
WebUI.click(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/button_Select’))
WebUI.selectOptionByValue(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/select_CDICDDSTAGIAIRE’), identity_contracttype, true)
WebUI.click(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_The Shadow Organizations’))
WebUI.setText(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_Search an organization_S’), identity_organisation)
//Start Parametrised checkbox and test object
WebUI.check(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_Europe (EUROPE)_Organiza_1’))
//(2…5).each
//WebUI.check(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/chk_shadow_organisation’,
// [(‘index’) : it]))
//End Parametrised checkbox and test object
WebUI.click(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/button_Select’))
WebUI.clearText(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_Password_ValidatePasswor’))
WebUI.setText(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/input_Password_ValidatePasswor’), identity_password)
WebUI.click(findTestObject(‘Memority_V1/Create Internal Identity/Page_Memority QA Test Create an in/button_Submit’))