Need a help to get xpath from span in Firefox


#1

i try the sample practice case Currency Convertor from Video: Using variables and loops Currency Convertor

i have to use Firefox to play recording, because the web site cannot be loaded in Chrome beta /IE (failed at step 5). Firebox can go through steps 1-10, but failed at step 11, shown below.

Error log:

Error executing WebElementAction
  com.workfusion.studio.rpa.recorder.model.playback.PlaybackException: Error executing TemplateAction[templateName=WebElementAction.ftl,id=11,name=Optional[WebElementAction],parent=5,arguments=ActionArguments[varName=[rate],delay=[0],useElementAttribute=[false],xsi:type=[recorder:WebElementAction, recorder:WebElementAction],pollingInterval=[300],active=[true],actionDetails=[(get by normalize-space(//*[@id="ucc-container"]/span[2]/span[2][@class="uccResultAmount"]) xpath)],searchInFrames=[true],xPath=[//*[@id='ucc-container']/span[2]/span[2][@class='uccResultAmount']],awaitTimeout=[5000]]]
      at com.workfusion.studio.rpa.recorder.model.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:54)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:27)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:14)
      at com.workfusion.studio.rpa.recorder.model.playback.player.ActionPlayer.next(ActionPlayer.java:51)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:147)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:108)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.IllegalStateException: Unable to process template with name: WebElementAction.ftl
      at com.workfusion.studio.rpa.recorder.code.FreemarkerTemplateProcessor.process(FreemarkerTemplateProcessor.java:59)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:34)
      at com.workfusion.studio.rpa.recorder.model.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:27)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:14)
      at com.workfusion.studio.rpa.recorder.model.playback.player.ActionPlayer.next(ActionPlayer.java:51)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:147)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:108)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> parentFrameXpath  [in template "WebElementAction.ftl" at line 5, column 14]

----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if parentFrameXpath?is_sequence  [in template "WebElementAction.ftl" at line 5, column 9]
----
      at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:131)
      at freemarker.core.Expression.assertNonNull(Expression.java:194)
      at freemarker.core.BuiltInsForMultipleTypes$is_sequenceBI._eval(BuiltInsForMultipleTypes.java:393)
      at freemarker.core.Expression.eval(Expression.java:78)
      at freemarker.core.Expression.evalToBoolean(Expression.java:124)
      at freemarker.core.Expression.evalToBoolean(Expression.java:110)
      at freemarker.core.IfBlock.accept(IfBlock.java:46)
      at freemarker.core.Environment.visitByHiddingParent(Environment.java:345)
      at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
      at freemarker.core.Environment.visit(Environment.java:324)
      at freemarker.core.MixedContent.accept(MixedContent.java:54)
      at freemarker.core.Environment.visitByHiddingParent(Environment.java:345)
      at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
      at freemarker.core.Environment.visit(Environment.java:324)
      at freemarker.core.MixedContent.accept(MixedContent.java:54)
      at freemarker.core.Environment.visit(Environment.java:324)
      at freemarker.core.Environment.process(Environment.java:302)
      at freemarker.template.Template.process(Template.java:325)
      at com.workfusion.studio.rpa.recorder.code.FreemarkerTemplateProcessor.process(FreemarkerTemplateProcessor.java:51)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:34)
      at com.workfusion.studio.rpa.recorder.model.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:27)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:14)
      at com.workfusion.studio.rpa.recorder.model.playback.player.ActionPlayer.next(ActionPlayer.java:51)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:147)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:108)
      at java.lang.Thread.run(Thread.java:745)

#2

HI @xqin1, you selected an option “Search in iframes”, but there is no iframe on the page. You need to un-check this box.