Error executing WebElementAction for Dynamic NAV


#1

Hi RPA Express

When I execute a web element for google or any other normal site then everything works fine. However when I try to login to Dynamics NAV (Microsoft ERP system) using a web browser then I get the following error and afterwards the web element does not work for any site.


What can I do to solve this issue so that I can access Dynamics NAV ?

Best regards,
Michael Callisen


#2

Hi Michael, can you send the complete text of the error?


#3

Hi Ashapkina,

Here is the full error message

Best regards,
Michael

errorNAV.pdf (23.6 KB)


#4

It is not very what can cause this problem. Is it possible to share the recording? You can send it in a private message in case you don’t want to post on the forum.


#5

Hi Ashapkina,

I get the error just by connecting to the URL with the Open Website element - so no real code has been created. I have attached the page you will receive when you connect with the same browser (Firefox and Chrome), to ensure you know what I mean.

The question is why RPA Express throws an error?

I’m running the BOT on a Windows 2016 on localhost … everything on the same instance so it should be OK.

Best regards,
Michael


#6

Try passing login and password in the URL like this


#7

Hi ashapkina,

This works on Chrome but not for Firefox (you cannot do this with IE) when I’m using RPA Express.

For now I see if I can execute the solution with Chrome but Firefox normally gives the beste result with RPA Express, do you intend to fix this bug in the near future?

Best regards,
Michael


#8

We usually recommend to use Chrome when possible as it works better.

What error do you get when you use it in Firefox?


#9

Hi Ashapkina,

I get the following error (it does not accept the user and password)

Best regards,
Michael Callisen

Error executing MouseClickAction
com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=MouseClickAction.ftl,id=7,name=Optional[MouseClickAction],parent=1,nextSibling=8,arguments=ActionArguments[exactMatch=[true],imageName=[C:\Users\rpa\workfusion-workspace\rpae_project\StdCost\1547646014154-anchor-1547646014219.apng],fullImageName=[1547646014154.png],xsi:type=[recorder:MouseClickAction, recorder:MouseClickAction],pollingInterval=[300],active=[true],searchInFrames=[false],type=[IMAGE],button=[1],delay=[0],webElementLocatorType=[XPATH],actionDetails=[(click left button)],webElementLocator=[//*[@id=“contentBox”]/div[1]/div[1]/div[2]/div[2]/a[1]],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.WebDriverException: Image not found : 1547646014154-anchor-1547646014219.apng
Command duration or timeout: 0 milliseconds
Build info: version: ‘9.2.0.4’, revision: ‘1a10eeeced’, time: ‘2018-11-29T10:44:59.891Z’
System info: host: ‘SIRPA01’, ip: ‘10.67.176.13’, os.name: ‘Windows NT (unknown)’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_121’
Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
Capabilities [{imageSimilarityThreshold=0.8, extra.executor.id={Name=RPA Recorder}, CLOSE_ALL_WINDOWS=false, browserName=universal, javascriptEnabled=true, extra.capabilities.context={“browserType”:“universal”,“startInPrivate”:false,“blockImages”:false,“maximizeOnStartup”:false,“customCapabilities”:{“platform”:“WINDOWS”,“javascriptEnabled”:true,“SEARCH_ALL_WINDOWS”:true,“CLOSE_ALL_WINDOWS”:false,“imageSimilarityThreshold”:“0.8”},“executorId”:{“Name”:“RPA Recorder”}}, platformName=WINDOWS, SEARCH_ALL_WINDOWS=true, platform=WINDOWS}]
Session ID: d42f6c8f-09f2-476b-9ad5-ab5ac0f0054e
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:741)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:677)
at com.workfusion.rpa.helpers.ImageElement.findImageCoordinates(ImageElement.java:156)
at com.workfusion.rpa.helpers.ImageElement.getCoordinates(ImageElement.java:69)
at com.workfusion.rpa.helpers.ImageElement.click(ImageElement.java:63)
at com.workfusion.rpa.helpers.UiElement.click(UiElement.java:996)
at org.openqa.selenium.WebElement$click$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at Script3.run(Script3.groovy:8)
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: java.util.NoSuchElementException: Image not found : 1547646014154-anchor-1547646014219.apng
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.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:238)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:250)
at Script1$1.call(Script1.groovy:12)
at Script1$1.call(Script1.groovy)
at com.workfusion.common.utils.SynchUtils.withFocusLock(SynchUtils.java:47)
at com.workfusion.common.utils.SynchUtils$withFocusLock.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:136)
at Script1.run(Script1.groovy:5)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:444)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:482)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:453)
at com.workfusion.autoit.driver.script.GroovyExecutor.execute(GroovyExecutor.java:45)
at com.workfusion.autoit.driver.AutoItDriver.executeScriptInternal(AutoItDriver.java:235)
at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:190)
at com.workfusion.universal.driver.UniversalDriver.executeScript(UniversalDriver.java:151)
at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:54)
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:205)
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)


#10

It cannot find the image. Did you capture the image in Chrome? Perhaps, it looks different when opened in Firefox…


#11

Hi Ashapkina,

Just realized that you trick with including the username and password in the URL does not work in Firefox, which is causing the error because in the end the BOT will execute the next step in the execution but in this case an on mouse click event. That will not work because username and password will never be accepted in Firefox because the username and password was incl. in the URL (your trick).

Do you expect to fix this in coming versions?

Best regards,
Michael Callisen