Custom Modal does not show up on drag and drop

I am using Katalon first time and have drag and drop tool in my application which opens up a custom modal within a application.

I drag question diamond under tool box and drop on connecting line which brings up custom modal. I have other drop downs in that modal that I need to select. After adding drag and drop code, I tried executing it and see below msg but custom pop up is not showing up. What do I need to do so that the custom modal shows up and then select on drop down?


Dragged object with id ‘Object Repository/DrgDrp/Page_ToolBox_Objects/div_Question Question’ to object with id ‘TestObject - ‘Object Repository/DrgDrp/Page_ToolBox_Objects/div_Abdominal Hemangioma_c-drop-area-indicator’’ successfully


1 Like

Time to reverse engineer this…

How well does it work when you try it manually (i.e. you drag and drop it yourself)?

What happens if you (for now) put in some WebUI.delay() or sleep()? Do you see it yourself after delaying for, say, 5 seconds?

I need details…

Thanks for your reply. I got that working using below code that I found on other site

WebDriver driver = DriverFactory.getWebDriver()
Actions builder = new Actions(driver)
WebElement sourceElement = WebUiCommonHelper.findWebElement(findTestObject(‘/your/source/test/object’), 20)
WebElement destElement = WebUiCommonHelper.findWebElement(findTestObject(‘/your/destination/test/object’), 20)

but the problem now is when I complete Age in Years module, upon Save it switches itself to 1st position. Patient gender is suppose to be first.

Its suppose to be as below

I will let @mwarren04011990 help you on getting you through your issue. However, I reviewed your code and noticed that you are using the boolean as “true” in your statement:

WebUI.selectOptionByValue(findTestObject('myPage/dropdown_QuestionType'), '2', true)

The boolean is to indicate if you need to compare using Regular Expression (RegEx) or not. RegEx allows you to use wildcard and other placeholders in your comparison rather that just straight comparison. With your value being 2, or 1, you do not need to use RegEx, so you should change your statements to use false.

WebUI.selectOptionByValue(findTestObject('myPage/dropdown_QuestionType'), '2', false)
Examples of using RegEx:

A customer number that can change format:

WebUI.verifyMatch(WebUI.getText(findTestObject('myPage/span_GeneralInfo.CDC Info')),
	'Customer_Acct - 01\\d{4,5}-1', true) 

A date timestamp when the instructions were added to the account.

WebUI.verifyMatch(WebUI.getAttribute(findTestObject('myPage/textarea_Instructions.Details'), 'value'), "Lorem4 ipsum a risus dapibus."
	+ "\\v\\[${gFormattedDate}\\s\\d{1,2}:\\d{2}:\\d{2}\\s(A|P)M\\]", true)

Thank you for your reply. Yes I changed it false ( it was false earlier) but I was trying new thing so forgot to change it back. But the problem is on Save my Patient Gender and Age diamond are changing which is not correct.


I don’t know if this is anything, but on your second Action, builder2, (line 33 and 34 in your image above) you create two web elements, sourceElement2 and destElement2. However, you then use your first set of web elements, not the two you just made. Perhaps if you change line 35 and 36 to use your second set of web element (sourceElement2 and destElement2), instead of reusing your first set, your element will move to the correct position.

Edit: Also, on another of your statements I see above, never use a “timeOut” of zero seconds. Nothing can be done in zero seconds and the statement will error out. Computers are fast, but they do still take a moment. For example, I use 10 seconds to test if an element is Visible or Present, and it’s usually done in half a second, and I use 2 seconds to test if an element is not Visible or not Present.

Thanks @grylion54. I tried changing what you suggested above but that is not also not helping.

End result looks like this which is wrong. Age should be after patient gender.