Hello,
I’m trying to input several sample text (one at a time) from a excel file. I want to put this in a loop so it will input each text from cell 1 then from cell 2 then from cell 3…
Any suggestion on bets way to get this done. The current loop is not working for me:
def info = WebUI.callTestCase(findTestCase(‘Simplify/data_setup’), [:], FailureHandling.STOP_ON_FAILURE)
def sampleText = info.sampleText
‘Global variable for env and nav to app’
Site = GlobalVariable.url_prod
WebUI.openBrowser(Site)
WebUI.waitForPageLoad(30)
for (row = 2; row <= findTestData(info).getRowNumbers(); row++) {
WebUI.sendKeys(findTestObject(‘Object Repository/Content_App/i_text_input_box’), Keys.chord(Keys.ENTER))
WebUI.sendKeys(findTestObject(‘Object Repository/Content_App/i_text_input_box’), Keys.chord(Keys.COMMAND, ‘a’))
WebUI.clearText(findTestObject(‘Object Repository/Content_App/i_text_input_box’))
WebUI.click(findTestObject(‘Object Repository/Content_App/i_text_input_box’))
WebUI.setText(findTestObject(‘Object Repository/Content_App/i_text_input_box’), sampleText)
CustomKeywords.‘com.clickhelper.clickHelper.clickUsingJS’(findTestObject(‘Object Repository/Content_main_func/a_summarize’),
}
