Hello any help is appreciated. I recently wrote a script to fill out a form(modal). My test runs seamlessly in Chrome. However, with Firefox it cannot find any of these elements. I have tried suggestions on the forum: Focus on modal, changing the CSS value, I even re-captured the object using Web Object Spy with Firefox. I did notice that if I use the clickElement(to) keyword from default examples, then it works correctly. All it does is convert the TestObject back to a WebElement and clicks it. Does Firefox have issues handling TestObjects? I supplied a dummied-down version of a TC with both clicks on the same element. Block under // Click by WebElement works, Click by TestObject does not.
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import org.openqa.selenium.WebElement as WebElement
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.util.KeywordUtil
import com.kms.katalon.core.webui.exception.WebElementNotFoundException
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import org.openqa.selenium.By
import internal.GlobalVariable as GlobalVariable
String username = findTestData(‘GSSO Users/Login Credentials’).getValue(‘Username’, 2)
String password = findTestData(‘GSSO Users/Login Credentials’).getValue(‘Password’, 2)
WebUI.openBrowser(’’)
‘Navigate to IMS Portal’
WebUI.navigateToUrl(GlobalVariable.portalURLNAV)
WebUI.maximizeWindow()
‘Login into IMS Portal’
CustomKeywords.‘imsPackage.portalKeywords.login’(username, password)
WebUI.switchToFrame(findTestObject(‘iframe_Imaging_clientFrame’), 10)
WebUI.waitForElementVisible(findTestObject(‘IMS Portal/Container_Navigational Pane/Sidebar Elements/button_Study Management’),
60)
‘Navigate to Study Management page’
WebUI.click(findTestObject(‘IMS Portal/Container_Navigational Pane/Sidebar Elements/button_Study Management’))
‘Verify that the Add Study button exist on the Study Management page’
assert WebUI.waitForElementVisible(findTestObject(‘IMS Portal/Pages/Page_Study Management/Add-Edit Study Elements/button_Add Study’),
10)
CustomKeywords.‘dynamicPackage.dynamicKeywords.highlightAndCapture’(findTestObject(‘IMS Portal/Pages/Page_Study Management/Add-Edit Study Elements/button_Add Study’))
‘Click Add study button’
WebUI.click(findTestObject(‘IMS Portal/Pages/Page_Study Management/Add-Edit Study Elements/button_Add Study’))
‘Verify Popup displays when Add Study button clicked’
assert WebUI.waitForElementVisible(findTestObject(‘IMS Portal/Pages/Page_Study Management/Add-Edit Study Elements/Popup Elements/popup_Add-Edit Study’),
10)
CustomKeywords.‘dynamicPackage.dynamicKeywords.highlightAndCapture’(findTestObject(‘IMS Portal/Pages/Page_Study Management/Add-Edit Study Elements/Popup Elements/popup_Add-Edit Study’))
/*
// Click by WebElemenrt
try {
WebElement element = WebUI.findWebElement(findTestObject(‘IMS Portal/Pages/Page_Study Management/Add-Edit Study Elements/Popup Elements/button_Submit’));
KeywordUtil.logInfo(“Clicking element”)
element.click()
KeywordUtil.markPassed(“Element has been clicked”)
} catch (WebElementNotFoundException e) {
KeywordUtil.markFailed(“Element not found”)
} catch (Exception e) {
KeywordUtil.markFailed(“Fail to click on element”)
}
*/
// Click by TestObject
‘Click Submit button’
WebUI.click(findTestObject(‘IMS Portal/Pages/Page_Study Management/Add-Edit Study Elements/Popup Elements/button_Submit’),
FailureHandling.STOP_ON_FAILURE)