Error executing WebElementAction

Hello,

I’m currently testing Workfusion and make tests to retrieve information from websites. Each time I want to get or select information (using Xpath), I receive below message. Could you please give me some tips to fixe this issue?

Thanks!

"Error executing WebElementAction
  com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=WebElementAction.ftl,id=3,name=Optional[WebElementAction],parent=1,arguments=ActionArguments[varName=[test],elementAttribute=[val],exactMatch=[true],xsi:type=[recorder:WebElementAction, recorder:WebElementAction],pollingInterval=[300],active=[true],searchInFrames=[false],type=[SET_VALUE],delay=[0],useElementAttribute=[true],webElementLocatorType=[XPATH],actionDetails=[(set by //*[@id="p_lt_ctl01_sb_txtWord"] xpath)],webElementLocator=[//*[@id="p_lt_ctl01_sb_txtWord"]],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.NoSuchWindowException: Unable to find element on closed window**
Build info: version: '9.1.0.0', revision: 'fd814778f3', time: '2018-08-23T11:59:12.788Z'
System info: host: 'CF1402', ip: '172.30.3.55', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{acceptInsecureCerts=false, browserVersion=11, se:ieOptions={nativeEvents=true, browserAttachTimeout=0, ie.ensureCleanSession=false, elementScrollBehavior=0, enablePersistentHover=false, ie.browserCommandLineSwitches=, ie.forceCreateProcessApi=false, requireWindowFocus=true, initialBrowserUrl=http://localhost:32430/, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, ignoreProtectedModeSettings=false}, browserName=internet explorer, pageLoadStrategy=normal, unhandledPromptBehavior=dismiss, javascriptEnabled=true, platformName=XP, setWindowRect=true, platform=XP}]
Session ID: de2d1bfa-c951-494c-abbd-b0f3014969e1
*** Element info: {Using=xpath, value=//*[@id="p_lt_ctl01_sb_txtWord"]}
Command duration or timeout: 0 milliseconds
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
      at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:41)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
      at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:723)
      at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:441)
      at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:543)
      at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
      at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:433)
      at com.workfusion.rpa.helpers.RPA.getElement(RPA.java:832)
      at com.workfusion.rpa.helpers.RPA.$(RPA.java:764)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:151)
      at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:102)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:206)
      at Script4.run(Script4.groovy:9)
      at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:48)
      at com.workfusion.studio.rpa.recorder.playback.player.PlaybackContext.executeScript(PlaybackContext.java:65)
      at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:33)
      at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
      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.NoSuchWindowException: Unable to find element on closed window
Build info: version: '9.1.0.0', revision: 'fd814778f3', time: '2018-08-23T11:59:12.788Z'
System info: host: 'CF1402', ip: '172.30.3.55', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{acceptInsecureCerts=false, browserVersion=11, se:ieOptions={nativeEvents=true, browserAttachTimeout=0, ie.ensureCleanSession=false, elementScrollBehavior=0, enablePersistentHover=false, ie.browserCommandLineSwitches=, ie.forceCreateProcessApi=false, requireWindowFocus=true, initialBrowserUrl=http://localhost:32430/, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, ignoreProtectedModeSettings=false}, browserName=internet explorer, pageLoadStrategy=normal, unhandledPromptBehavior=dismiss, javascriptEnabled=true, platformName=XP, setWindowRect=true, platform=XP}]
Session ID: de2d1bfa-c951-494c-abbd-b0f3014969e1
*** Element info: {Using=xpath, value=//*[@id="p_lt_ctl01_sb_txtWord"]}
Build info: version: '9.1.0.0', revision: 'fd814778f3', time: '2018-08-23T11:59:12.788Z'
System info: host: 'CF1402', ip: '172.30.3.55', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: UniversalDriver
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:186)
      at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:121)
      at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
      at org.openqa.selenium.remote.server.ActiveSessionCommandExecutor.execute(ActiveSessionCommandExecutor.java:43)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:723)
      at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:441)
      at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:543)
      at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
      at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:433)
      at com.workfusion.universal.driver.UniversalDriver.findElement(UniversalDriver.java:81)
      at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:48)
      at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:33)
      at org.openqa.selenium.remote.server.handler.WebDriverHandler.handle(WebDriverHandler.java:41)
      at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:133)
      at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:204)
      at org.openqa.selenium.remote.server.InMemorySession.execute(InMemorySession.java:98)
      at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:231)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
"

@loger could you share the URL of the page you work with?

You won’t be able to use the adress but I have the same issue if I try to reach Xpath //*[@id=“source”] on https://translate.google.com/

I couldn’t reproduce this issue, it seems to work in all browsers.

Could you advise the version of RPA Express you are using and the version of the browser?

You can find the version of RPA Express in Programs and Features list.

Version Lumen 2.1.2 is installed.
Thanks for your help.

Thank you @loger
what is the version of the browser you use?

Also, do you get this error in all browsers (Chrome, Firefox, IE)?

IE : IE11 (11.447.14393.0)
Chrome : 70.0.3538.77 (Official Build) (32-bit)

Because of a proxy Sign in page, I’m not able to use Chrome. I only use it to find Xpath elements.

I tried again this morning ( with IE) and still have message " Unable to find element on closed window"

Thanks

Thank you @loger
please check that you have correct Internet Explorer settings.

Configuring-Internet-Explorer-for-RPA.pdf (368.7 KB)

If the settings are correct and you still get this issue, please send us RPA logs from C:\RPAExpress\RPA\logs