Я написал сценарий Katalon, чтобы использовать данные из электронной таблицы Excel для выбора параметров при веб-тестировании. При запуске скрипта он вводит имя экспорта, которое определено в электронной таблице Excel. Когда дело доходит до выбора варианта, возникает ошибка. Вот ошибка, которую я получаю во время работы.
=============== ROOT CAUSE =====================
For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshoot-common-execution-exceptions-web-test.html
================================================
08-06-2020 06:02:01 PM Test Cases/Test
Elapsed time: 39.922s
Test Cases/Test FAILED.
Reason:
groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.selectOptionByValue() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject, java.lang.String) values: [TestObject - 'Object Repository/Page_grid /select_Tiff Package Imagine --- No Output ---', ...]
Possible solutions: selectOptionByValue(com.kms.katalon.core.testobject.TestObject, java.lang.String, boolean), selectOptionByValue(com.kms.katalon.core.testobject.TestObject, java.lang.String, boolean, com.kms.katalon.core.model.FailureHandling), deselectOptionByValue(com.kms.katalon.core.testobject.TestObject, java.lang.String, boolean), deselectOptionByValue(com.kms.katalon.core.testobject.TestObject, java.lang.String, boolean, com.kms.katalon.core.model.FailureHandling), selectOptionByLabel(com.kms.katalon.core.testobject.TestObject, java.lang.String, boolean)
at FG3D Test.run(Test:49)
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:339)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:330)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:309)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:301)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:235)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1596751320107.run(TempTestCase1596751320107.groovy:25)
Ниже мой скрипт и таблица Excel, которую я использую.
WebUI.openBrowser('')
WebUI.navigateToUrl('URL')
for (def row = 1; row <= findTestData('Test Data').getRowNumbers(); row++) {
WebUI.click(findTestObject('Object Repository/Page_grid/button_Options'))
WebUI.click(findTestObject('Object Repository/Page_grid/a_View on map'))
WebUI.switchToWindowTitle('Map – grid')
WebUI.click(findTestObject('Page_grid/input_Selection area'))
WebUI.click(findTestObject('Page_grid/span_Export'))
WebUI.setText(findTestObject('Page_grid/input_Export Name_name'), findTestData('Test Data').getValue('id_name',
row))
WebUI.selectOptionByValue(findTestObject('Page_grid/select_GeoTiff GeoPackage ERDAS Imagine --- No Output ---'),
findTestData('Test Data').getValue('imagery', row))
WebUI.selectOptionByValue(findTestObject('Page_grid/select_Tiff Package DTED --- No Output ---'), findTestData(
'Test Data').getValue('elevation', row))
WebUI.selectOptionByValue(findTestObject('Page_grid/select_ESRI Shapefile GeoPackage KML --- No Output ---'),
findTestData('Test Data').getValue('vectors', row))
WebUI.selectOptionByValue(findTestObject('Page_grid/select_OpenFlight Collada KMZ GLB FBX OBJ --- No Output ---'),
findTestData('Test Data').getValue('models', row))
WebUI.click(findTestObject('Page_grid/button_Finish'))
}