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 static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
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.testng.keyword.TestNGBuiltinKeywords as TestNGKW
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 com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys

WebUI.openBrowser('')

WebUI.navigateToUrl('https://kaumancare.my.id/login')

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/input_nameexample.com'), 'admin@example.com')

WebUI.click(findTestObject('Page_Aplikasi Kepegawaian/input_'))

WebUI.setEncryptedText(findTestObject('Page_Aplikasi Kepegawaian/input_'), 'RAIVpflpDOg=')

WebUI.click(findTestObject('Page_Aplikasi Kepegawaian/button_Login'))

WebUI.click(findTestObject('Page_Aplikasi Kepegawaian/a_Pegawai'))

WebUI.click(findTestObject('Page_Aplikasi Kepegawaian/a_Tambah Pegawai'))

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/input_NIP _'), '1121006')

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/input_Nama Lengkap _'), 'Ardilaputri')

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/input_Email _'), 'ardila@gmail.com')

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/input_No. Telp_HP'), '08181928301')

WebUI.selectOptionByValue(findTestObject('Page_Aplikasi Kepegawaian/select_Jenis Kelamin _'), 'P', false)

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/input_Tempat Lahir'), 'Surabaya')

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/input_Tanggal Lahir'), '12-12-2003')

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/input_Kota'), 'Surabaya')

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/textarea_Alamat'), 'Jalan melati')

WebUI.click(findTestObject('Page_Aplikasi Kepegawaian/input_Password _'))

WebUI.setEncryptedText(findTestObject('Page_Aplikasi Kepegawaian/input_Password _'), 'The5O9L3FNg=')

WebUI.click(findTestObject('Page_Aplikasi Kepegawaian/button_Data Pekerjaan'))

WebUI.selectOptionByValue(findTestObject('Page_Aplikasi Kepegawaian/select_Divisi _'), '52', false)

WebUI.selectOptionByValue(findTestObject('Page_Aplikasi Kepegawaian/select_Jabatan _'), '35', false)

WebUI.selectOptionByValue(findTestObject('Page_Aplikasi Kepegawaian/select_Pendidikan'), '7', false)

WebUI.selectOptionByValue(findTestObject('Page_Aplikasi Kepegawaian/select_Golongan'), '01krbgk73dfb2qcbx885881k5x', false)

WebUI.setText(findTestObject('Page_Aplikasi Kepegawaian/input_Tanggal Mulai Kerja'), '12-12-2023')

WebUI.click(findTestObject('Page_Aplikasi Kepegawaian/button_Simpan Pegawai'))

WebUI.closeBrowser()

