Below is the code I use to select from a list of clickable elements. It works with Chrome and moves on to the next Test Case fine, but in Firefox it doesn’t work but still moves on as if the Test Case passes and all following Test Cases fail.
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import org.openqa.selenium.WebElement
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable
List<WebElement> dispatchEntryList = WebUI.findWebElements(findTestObject('Object Repository/Dispatch List/Buttons/Dispatch Entry'), 2)
if(dispatchEntryList.size() > 0) {
int count = -1;
for(int i = 0; i < dispatchEntryList.size(); i++)
if(dispatchEntryList.get(i).getAttribute('outerText').equals('# ' + GlobalVariable.dispatchNumber)) {
count = i;
break;
}
if(count != -1)
dispatchEntryList.get(count).click()
}
The image shows my list of items. I am trying to click the one numbered #1702