Problems with clicking on a web element "a href"

Hello.
I am trying to use the “Click Mouse” function in an “a ref” element of a web page, but it does not work well for me.
I have tried with “Web element”:

and after a short time, an error appears.

Y he probado con “Image”:
image

and it makes the pulsation too fast and does not effect on the web.

I do not know what I can do anymore. I await your help. Thank you.

Can you share the url of the page, on which you are trying to click the link, and the text of the error?

Hello.
I can not tell you the URL, but the error is this:

Error executing MouseClickAction
com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=MouseClickAction.ftl,id=9,name=Optional[MouseClickAction],parent=1,nextSibling=10,arguments=ActionArguments[exactMatch=[true],xsi:type=[recorder:MouseClickAction, recorder:MouseClickAction],pollingInterval=[300],active=[true],searchInFrames=[false],type=[WEB_ELEMENT],button=[1],delay=[0],webElementLocatorType=[XPATH],comment=[Pulsar en “Operador de Area Electricidad”.],actionDetails=[(click left button)],webElementLocator=[//*[@id=“content-box”]/div/div/div/div[1]/div[2]/div/div/a],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:30)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:53)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:153)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:113)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=66.0.3359.181)
(Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘9.0.0.3’, revision: ‘1610cb545e’, time: '2018-05-24T16:45:36.185Z’
System info: host: ‘BLADE7’, ip: ‘192.168.30.242’, os.name: ‘Windows Server 2012 R2’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: '1.8.0_121’
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=WIN8_1, acceptSslCerts=false, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=WIN8_1, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb), userDataDir=C:\Users\WORKFU~1\AppData\Local\Temp\scoped_dir19060_31664}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=66.0.3359.181, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
Session ID: 32d83d87cb8a7b992fd0d707700503f3
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:656)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:284)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:82)
at com.workfusion.rpa.helpers.UiElement.click(UiElement.java:832)
at org.openqa.selenium.WebElement$click.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at Script10.run(Script10.groovy:10)
at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:90)
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:35)
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:30)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:53)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:153)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:113)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=66.0.3359.181)
(Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘9.0.0.3’, revision: ‘1610cb545e’, time: '2018-05-24T16:45:36.185Z’
System info: host: ‘BLADE7’, ip: ‘192.168.30.242’, os.name: ‘Windows Server 2012 R2’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: '1.8.0_121’
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=WIN8_1, acceptSslCerts=false, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=WIN8_1, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb), userDataDir=C:\Users\WORKFU~1\AppData\Local\Temp\scoped_dir19060_31664}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=66.0.3359.181, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
Session ID: 32d83d87cb8a7b992fd0d707700503f3
Build info: version: ‘9.0.0.3’, revision: ‘1610cb545e’, time: '2018-05-24T16:45:36.185Z’
System info: host: ‘BLADE7’, ip: ‘192.168.30.242’, os.name: ‘Windows Server 2012 R2’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: '1.8.0_121’
Driver info: driver.version: RemoteWebDriver
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.server.ActiveSessionCommandExecutor.execute(ActiveSessionCommandExecutor.java:43)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:656)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:284)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:82)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:64)
at com.sun.proxy.$Proxy20.click(Unknown Source)
at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:33)
at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:11)
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:203)
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)

image

Greetings.

This is the element XPatch:

Greetings.

Thank you Juan.
The action fails due to the timeout.

Try setting a bigger timeout for the action, for example, 10 seconds.

image

Thanks. It’s work!

image

But when “Wait up to:” is 100 or 200, not working fine.

Thank you!

Yes, such timeout would be too small. The page doesn’t have enough time to load, so the bot cannot find and click the element before the timeout.
The timeout for web actions should be about 10s. The default settings is 5s, but sometimes it is not enough, when the internet or the website itself is slow, for example.

Okay, thank you very much for the clarification.

1 Like

@ashapkina
I had similar error for the timout. Error executing MouseClickAction.txt (590 Bytes)
the error occur when it cannot locate the search box of a website, should i increase the “Wait up to” or “Wait ms before performing this action”. What is the difference?
mouseclick

“Wait up to” timeout means that, in case there is an issue with executing the action, the bot will try to execute it during the defined period of time before throwing an error and stopping the recording. So if you have 10,000 ms set up in this timeout, the bot will try to perform this action every 300 ms (default polling interval) for 10 seconds.

“Wait” timeout means that the bot will not perform any actions for this period of time and will just wait. If you have 10,000 ms set up in this timeout, the bot will do nothing for 10 seconds and then will start trying to execute the action.

@ashapkina okie thanks.
I guess for my case, i’ll try to use “Wait” so that the search page will have time to load before the mouse click action. :sweat_smile:

1 Like

@ashapkina I still got error at mouse click. I have set “wait” to 20000ms. It could be due to the old pc that I am running on.
I also tried “wait up to” as well? say “wait up to” 60000ms.
Does that mean the bot will wait for 20000ms and try to execute it within 60000ms?

Yes, it does.

Are you sure it fails because it times out? Can you share the whole text of the error?