Can't click on one link in IE 11

The middle link is not getting clicked in IE 11 ( it just skips to the next line) and there is no error. The link above and below the change password link works in IE 11 and all the links are clicked in chrome.

WebUI.click(findTestObject(‘Object Repository/Page_/a_Info’))
WebUI.delay(10)
WebUI.click(findTestObject(‘Object Repository/Page_/a_Change Password’))
WebUI.click(findTestObject(‘Object Repository/Page_/a_Logoff’))

Tried adding as below but got error in IE
WebUI.waitForElementVisible(‘Object Repository/Page_/a_Change Password’, 10)
WebUI.waitForElementClickable(‘Object Repository/Page_/a_Change Password’, 10)

Tried changing to
WebUI.clickOffset(‘Object Repository/Page_/a_Change Password’, 5, 5)

but then I get below error:

No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.clickOffset() is applicable for argument types: (java.lang.String, java.lang.Integer, java.lang.Integer) values: [Object Repository/Page_/a_Change Password, 5, 5]
Possible solutions: clickOffset(com.kms.katalon.core.testobject.TestObject, int, int), clickOffset(com.kms.katalon.core.testobject.TestObject, int, int, com.kms.katalon.core.model.FailureHandling)
at Emro_Prod_Obj_links.run(Emro_Prod_Obj_links:40)
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:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
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 TempTestCase1563981620685.run(TempTestCase1563981620685.groovy:21)

Looks to me like you’re missing calls to findTestObject:

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Page_/a_Change Password’), 10)

1 Like

Thanks! I tried with below after editing format :

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Page_/a_Change Password’),10)
WebUI.waitForElementClickable(findTestObject(‘Object Repository/Page_/a_Change Password’),10)

WebUI.click(findTestObject(‘Object Repository/Page_/a_Change Password’))

but it still does not click the Change Password link and it goes to next line below, logs off

WebUI.click(findTestObject(‘Object Repository/Page_/a_Logoff’))

Totally appreciate your help!
Tina

Are you certain? What happens if you delete the logoff line?

Tried many many times and now, commented out and tried. It does nothing. it does not click that link

//WebUI.click(findTestObject(‘Object Repository/Page_/a_Logoff’))

//WebUI.closeBrowser()

Okay, so now we have to suspect there’s something wrong with your Test Object 'Object Repository/Page_/a_Change Password'

Show me how it’s defined in the OR.

And a screenshot of the inspector might be useful, too.

Thanks a ton for looking into it!
I recorded using katalon recorder and didn’t edit object repository for any of the links ( incl log off which works)

What document mode is IE using?

It is set to 11

Something is wrong somewhere…

I’d like to see a screenshot of the inspector showing that element and the console claiming it’s a null reference when you try to click it.

When I click the Change Password on the web page manually - it works but not if I type :
document.getElementById(‘lnkLogoff’).click in console and press the green arrow button

Sorry, Tina, my bad. The element is in an IFrame – I completely missed that. None of the last half dozen or so tests are meaningful.

ok, np! learned something new how to test…

1 Like

Just realized that my format for WebUI.clickOffset(‘Object Repository/Page_/a_Change Password’, 5, 5) was
wrong. the last two are co-ordinates i.e 5,5. How do I find co-ordinates of Change Password on the web page?

will retry replacing click with clickOffset if i can get co-ordinates to work…

I used below before:
WebUI.click(findTestObject(‘Object Repository/Page_/a_Change Password’))

I have no experience working with the offset API.

But try this:

document.querySelector('your-iframe-here').contentWindow.document.querySelector('#lnkChangePassword').click()

Hopefully, that will click the link.

Two ways:

  1. You have a definition for it in your test object properties (you posted it earlier).

  2. Start from scratch, post your HTML showing the iframe and we’ll dig out a reference/selector that works.

Aside: I’m going to tidy up this thread by deleting all that erroneous crapola I posted earlier.

I need to see the line in the HTML that says <iframe ...>

looks like it is a frame and not iframe…does that make a difference?
I tried it again with the frame name but get the same error.

frame/iframe, whatever. Please show it to me.