Saving the Record is not working

<Hello Again,

I am able to scroll to the element that I need, but it is a Save Button that should save a record. Here is the script and the messages I received: The element is a_Save_EnterProse_Details

–>

The screen does scroll to the area where the save button element is located, but I am having trouble getting it to press the button. Once the button is pressed, there is ~25second wait for the screen to change.

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(‘http://sc58lrdmd01:8090/mdm/bcm/framework/login.jsp’)

WebUI.setText(findTestObject(‘Object Repository/Install Code/Page_Charter MDM Server/input_Charter MDM Server_username’),
‘KarlaAdmin’)

WebUI.setEncryptedText(findTestObject(‘Object Repository/Install Code/Page_Charter MDM Server/input_Login Name_password’),
‘WJh/YgfG6lrL/a8dqDFFEw==’)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_Charter MDM Server/button_Log In’))

WebUI.maximizeWindow()

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/mat-card-content_SolutionsSolutions’))

WebUI.setText(findTestObject(‘Object Repository/Install Code/Page_MDM Server/input_Description_FILTER_DESCRIPTION’), ‘Install Code’)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Search’))

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’), 30)

WebUI.waitForElementClickable(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’), 30)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_View Reference Data’))

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label_1’), 30)

WebUI.waitForElementClickable(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label_1’), 30)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label_1’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Edit Enterprise Value’))

WebUI.delay(45)

WebUI.enhancedClick(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Edit Enterprise Value’))

WebUI.delay(45)

WebUI.scrollToElement(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Save Enterprise Details’), 3)

Webui.Enhanced(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Save Enterprise Details’))

WebUI.waitForElementPresent(findTestObject(‘Object Repository/Install Code/Page_MDM Server/mat-icon_menu’), 45)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/mat-icon_menu’))

WebUI.enhancedClick(findTestObject(‘Object Repository/Install Code/Page_MDM Server/mat-panel-title_folder Solutions’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Approval Dashboard’))

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’), 30)

WebUI.waitForElementClickable(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’), 30)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Take Action’))

WebUI.waitForElementVisible(findTestObject(‘Install Code/Page_MDM Server/label_3’), 30)

WebUI.waitForElementClickable(findTestObject(‘Install Code/Page_MDM Server/label_3’), 30)

WebUI.click(findTestObject(‘Install Code/Page_MDM Server/label_3’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Accept’))

Thanks!

Karla Fliger

<image

Hello! I would like to find out more from an expert of you can help. Thanks in advance!

Karla

Hello Again, I made a few changes that are still not working.

Here is the 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 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(‘http://sc58lrdmd01:8090/mdm/bcm/framework/login.jsp’)

WebUI.setText(findTestObject(‘Object Repository/Install Code/Page_Charter MDM Server/input_Charter MDM Server_username’),
‘KarlaAdmin’)

WebUI.setEncryptedText(findTestObject(‘Object Repository/Install Code/Page_Charter MDM Server/input_Login Name_password’),
‘WJh/YgfG6lrL/a8dqDFFEw==’)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_Charter MDM Server/button_Log In’))

WebUI.maximizeWindow()

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/mat-card-content_SolutionsSolutions’))

WebUI.setText(findTestObject(‘Object Repository/Install Code/Page_MDM Server/input_Description_FILTER_DESCRIPTION’), ‘Install Code’)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Search’))

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’), 30)

WebUI.waitForElementClickable(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’), 30)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_View Reference Data’))

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label_1’), 30)

WebUI.waitForElementClickable(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label_1’), 30)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label_1’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Edit Enterprise Value’))

WebUI.delay(45)

WebUI.enhancedClick(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Edit Enterprise Value’))

WebUI.delay(45)

WebUI.scrollToElement(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Save Enterprise Details’), 3)

WebUI.delay(45)

Webui.enhancedClick(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Save Enterprise Details’))

WebUI.delay(45)

WebUI.waitForElementPresent(findTestObject(‘Object Repository/Install Code/Page_MDM Server/mat-icon_menu’), 45)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/mat-icon_menu’))

WebUI.enhancedClick(findTestObject(‘Object Repository/Install Code/Page_MDM Server/mat-panel-title_folder Solutions’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Approval Dashboard’))

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’), 30)

WebUI.waitForElementClickable(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’), 30)

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/label’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Take Action’))

WebUI.waitForElementVisible(findTestObject(‘Install Code/Page_MDM Server/label_3’), 30)

WebUI.waitForElementClickable(findTestObject(‘Install Code/Page_MDM Server/label_3’), 30)

WebUI.click(findTestObject(‘Install Code/Page_MDM Server/label_3’))

WebUI.click(findTestObject(‘Object Repository/Install Code/Page_MDM Server/a_Accept’))

And what I want to achieve is to click the Save Enterprise record button and wait for the splash screen to clear so the records can be selected on the next screen. I can see the button, but I am doing something wrong because it will not select the button.

Here is the error:

I was able to get passed the error by using enhancedclick with a delay to make sure the spinner is not still on the screen.

1 Like