I have taken values from xpath which is a list but when saved it in one variable it is saves like a string and list contain only one element. When I tried to split the string with windows line break it was not working.
@abhimanyu_thit try using Linux line break, or using an Xpath that works for all options and save to a list variable. Try using this xpath //*[@id=âallCategoriesâ]//option. Does it work in this case?
Error executing WebElementAction
com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=WebElementAction.ftl,id=5,name=Optional[WebElementAction],parent=2,arguments=ActionArguments[varName=[persons],elementAttribute=[option],exactMatch=[true],xsi:type=[recorder:WebElementAction, recorder:WebElementAction],pollingInterval=[300],active=[true],searchInFrames=[false],delay=[0],useElementAttribute=[false],webElementLocatorType=[XPATH],actionDetails=[(get by //[@id=âallCategoriesâ]//option xpath)],webElementLocator=[//[@id=âallCategoriesâ]//option],awaitTimeout=[5000]]]
at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:54)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:28)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:15)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:64)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:152)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:112)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression //[@id=âallCategoriesâ]//option because of the following error:
SyntaxError: Failed to execute âevaluateâ on âDocumentâ: The string '//[@id=âallCategoriesâ]//optionâ is not a valid XPath expression.
@ashapkina Not able to share the URL due to it is not accessible outside the our network.
this is xpath of that component.
//*[@id=âallCategoriesâ]
How did I find whether it is pointing to all options or not?
I am using //*[@id=âquickAddCandidateFormâ]/table[2]/tbody/tr[1]/td[2]/table/tbody/tr/td[1] this XPath, and it will gives all value in one string with separated by new line if I print in notepad.
If I used List variable then list having only one variable of this big string. and normal string variable not able to split it with windows line break. I tried with linux line break as well.