Hey DuyLuong,
While the information in the 3rd (bottom) video was slightly more insightful, it still didn’t show me how to loop through data in the ‘Test Case’ itself. What I’m looking for is guidance on the FOR loop statement in a ‘test’ case’ not the ‘test suite’. my image was not retained from the initial post and not sure why. BUT here is what I have but I KNOW i’m missing something just not sure what. Below is what I have so far. i have my data file defined, i’m missing something that loops through the rows of the data file for the users. Again, the last video you posted was pretty close BUT it doesn’t show me how to the perform the FOR loop in a test case from the data file.
def data = TestDataFactory(“UserID_TesData”)
WebUI.openBrowser(’’)
WebUI.navigateToUrl(‘https://www.website.com/home’)
for (def index : (0…data.getRowNumbers() - 1)) {
WebUI.click(findTestObject(‘Home (1)/a_Log In’))
WebUI.waitForElementVisible(findTestObject('Home (1)/input_txtpassword'), 30)
WebUI.setText(findTestObject('Home (1)/input_txtusername'), UserID_S)
WebUI.setText(findTestObject('Home (1)/input_txtpassword'), '<password>')
WebUI.click(findTestObject('Home (1)/button_Log In'))
WebUI.rightClick(findTestObject('Quick Entry (1)/span_Hi'))
WebUI.click(findTestObject('Quick Entry (1)/span_Log Out'))
}
not_run: WebUI.closeBrowser()