Handling Slider on Web Testing with Drag and Drop can't get Width value from Excel? Running from Test Suites Problem

hi guys, i’ve a problem, i’ve tried using drag and drop for slider, but i’ve a problem with get data from excel my code is like
WebUI.dragAndDropByOffset(findTestObject('slider/slider_meninggal'), variable, 0)

and the error looks like

groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.dragAndDropByOffset() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject, java.lang.String, java.lang.Integer) values: [TestObject - ‘Object Repository/slider/slider_meninggal’, 170, …]
Possible solutions: dragAndDropByOffset(com.kms.katalon.core.testobject.TestObject, int, int), dragAndDropByOffset(com.kms.katalon.core.testobject.TestObject, int, int, com.kms.katalon.core.model.FailureHandling)
at Flexi Health Using Excel Input Data.run(Flexi Health Using Excel Input Data:124)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:398)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:389)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:368)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:360)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:255)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:203)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:152)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:95)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1622649145477.run(TempTestSuite1622649145477.groovy:39)

Please help :frowning:
thanks

According to the MissingMethodException error message, the data type of “variable” in your statement (below) is a String rather than an Integer.

WebUI.dragAndDropByOffset(findTestObject('slider/slider_meninggal'), variable, 0)

Perhaps change your statement to:

WebUI.dragAndDropByOffset(findTestObject('slider/slider_meninggal'), Integer.parseInt(variable), 0)

ahaha wow that was a simple code, thank you so much @grylion54 :slight_smile: before it i’m using this logic :rofl: :

String myStringd = mystrvar;
int variable = Integer.parseInt(myStringd)
WebUI.dragAndDropByOffset(Path.object, variable, 0, FailureHandling.OPTIONAL)