How do you click a "span" arrow

Hi, helpful people. I have hit a problem with an arrow key and katalons reluctance to enable me to click it.
Here is the arrow I need to click:

This is the section of code, im trying to click

One of my colleagues wrote me some script but it gave me an error

$(‘.yearSelector:visible .next.pull-right span’).click()

=============== ROOT CAUSE =====================
Caused by: groovy.lang.MissingMethodException: No signature of method: Script1686819163656.$() is applicable for argument types: (java.lang.String) values: [.yearSelector:visible .next.pull-right span]

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

06-26-2023 09:00:42 PM Test Cases/Complete Bookings/Ocean Cruise Bookings/Ocean Cruise full booking - manual address for SOD Products

Elapsed time: 18.085s

Test Cases/Complete Bookings/Ocean Cruise Bookings/Ocean Cruise full booking - manual address for SOD Products FAILED.
Reason:
com.kms.katalon.core.exception.StepErrorException: Call Test Case ‘Test Cases/Filter/Filter drop down for Cruise SOA with Month and Nights’ failed because of error(s)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:66)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:74)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:81)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:44)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)
at Ocean Cruise full booking - manual address for SOD Products.run(Ocean Cruise full booking - manual address for SOD Products:22)
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:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:142)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1687809639604.run(TempTestCase1687809639604.groovy:25)
Caused by: groovy.lang.MissingMethodException: No signature of method: Script1686819163656.$() is applicable for argument types: (java.lang.String) values: [.yearSelector:visible .next.pull-right span]
Possible solutions: is(java.lang.Object), run(), run(), any(), use([Ljava.lang.Object;), any(groovy.lang.Closure)
at Filter drop down for Cruise SOA with Month and Nights.run(Filter drop down for Cruise SOA with Month and Nights:32)
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:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:142)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:59)
… 18 more

I have tried send keys that didnt work, ive tried mapping it but I get this but it still cant click it://div[@id=‘oceanCruiseSearchContent’]/div/div[2]/div/div/div/a[2]/span

Please take pity on me :slight_smile:

Hi,

It is nice to share your problem here. Lots of people here are incredible and willing to support

@lisa.s Your date picker is not visible on the screen:

Furthermore, your link (<a> element) contains effectively nothing since the span within it is empty:

Therefore, you have nothing to click on.

Also, the code you were trying is JavaScript. To use JavaScript in Groovy (in Katalon) you need to use

WebUI.executeJavaScript.

Ahh, Thanks Russ that helps a lot :heart_eyes:

(you came to my rescue again today, from some previous help you gave last year, its like, if I think of you, you come to my aid :slight_smile:)

Good to hear, thanks !
:nerd_face: