Unable to click on object

if something goes wrong like these steps to fix how? because I tried Try it with a different locator. but not yet?

katalon error.png

error katalon 2.png

please share your script so that we can have the better understanding of a problem.

kishor sharma said:

please share your script so that we can have the better understanding of a problem.

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.navigateToUrl('http://localhost/sa-ud/’)

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Masuk ke aplikasi/input_username’), ‘superuser’)

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Masuk ke aplikasi/input_password’), ‘superman’)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Masuk ke aplikasi/button_Masuk’))

WebUI.waitForElementVisible(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/a_dcjq-parent’), 5)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Persediaan/a_dcjq-parent’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/span_PENJUALAN’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/span_PENJUALAN’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Persediaan/ul_nav-accordion’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/a_Penjualan’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/a_dcjq-parent’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/a_dt-button btn btn-flat btn-’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/span_ROLAS ASIH ( Pasar Wage…’))

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/input_select2-search__field’), ‘kato kroya’)

WebUI.sendKeys(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/input_select2-search__field’), Keys.chord(Keys.ENTER))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/label_Posting Transaksi’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/th_prev’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/th_prev’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/th_prev’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/th_October 2017’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/span_Nov’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/td_30’))

WebUI.selectOptionByValue(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/select_penjualanid_salesman’), ‘2’,
true)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/a_btn btn-round btn-primary’))

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/input_detail_transaksi0jumlah_’), ‘1’)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/div_panel-body’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/div_panel-body_1’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/td_31’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/td_31’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/a_btnAddDiskon0’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/a_btnAddPajak0’))

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/input_detail_transaksi0diskond’), ‘1’)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/td_31’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/form_formTransaksi’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/button_Simpan’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/button_Simpan_1’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/div_ascrail2001’))

WebUI.closeBrowser()

this is a sample script. Which part should I correct?

kishor sharma said:

please share your script so that we can have the better understanding of a problem.

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.navigateToUrl('http://localhost/sa-ud/’)

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Masuk ke aplikasi/input_username’), ‘superuser’)

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Masuk ke aplikasi/input_password’), ‘superman’)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Masuk ke aplikasi/button_Masuk’))

WebUI.waitForElementVisible(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/a_dcjq-parent’), 5)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Persediaan/a_dcjq-parent’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/span_PENJUALAN’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/span_PENJUALAN’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Persediaan/ul_nav-accordion’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/a_Penjualan’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/a_dcjq-parent’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/a_dt-button btn btn-flat btn-’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/span_ROLAS ASIH ( Pasar Wage…’))

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/input_select2-search__field’), ‘kato kroya’)

WebUI.sendKeys(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/input_select2-search__field’), Keys.chord(Keys.ENTER))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/label_Posting Transaksi’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/th_prev’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/th_prev’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/th_prev’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/th_October 2017’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/span_Nov’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/td_30’))

WebUI.selectOptionByValue(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/select_penjualanid_salesman’), ‘2’,
true)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/a_btn btn-round btn-primary’))

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/input_detail_transaksi0jumlah_’), ‘1’)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/div_panel-body’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/div_panel-body_1’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/td_31’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/td_31’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/a_btnAddDiskon0’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/a_btnAddPajak0’))

WebUI.setText(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/input_detail_transaksi0diskond’), ‘1’)

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/td_31’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/form_formTransaksi’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/button_Simpan’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Tambah penjualan/button_Simpan_1’))

WebUI.click(findTestObject(‘penjualpertama19012018/Page_Data Penjualan/div_ascrail2001’))

WebUI.closeBrowser()

this is a sample script. Which part should I correct?