Not able to fill CurrentRow into Strict Selector of Click

I’m trying to use UiPath Studio to download chess record from the library of Chess.com (Chess Library - Create Your Own Game Collections - Chess.com)

The flow is, click each name from Collection Name, then select all games, click download.

I used Extract Table Data and I got the list of Collection Name as ExtractTableData successfully.
Then I would like to use Click to simulate a user click on Collection Name each by each. So I used For Each Row in Data Table and got each Collection Name as CurrentRow(“Collection Name”).
Verified by using Message Box to print it out.

But when I added a input the Strict Selector of Click as below, I always got error

Error message is
24.2.1-beta.15932+Branch.release-v24.2.1.Sha.3f90483a69af341308fcab9ad25ddc1395738901.3f90483a69af341308fcab9ad25ddc1395738901

Source: Click ‘Bobby Fischer’

Message: Could not find the user-interface (UI) element for this action.

Possible solutions:
• Ensure application is opened and the UI element is visible on the screen at execution time
• Edit the Target of the UI activity and use Validation to debug the issue.
• If needed, re-indicate the element as its properties might have changed
• Use “Check state” activity to check the application state before executing the action
• Increase the “Delay before” value to allow time to the application to render entirely and become responsive

Exception Type: UiPath.UIAutomationNext.Exceptions.NodeNotFoundException

UiPath.UIAutomationNext.Exceptions.NodeNotFoundException: Could not find the user-interface (UI) element for this action.

Possible solutions:
• Ensure application is opened and the UI element is visible on the screen at execution time
• Edit the Target of the UI activity and use Validation to debug the issue.
• If needed, re-indicate the element as its properties might have changed
• Use “Check state” activity to check the application state before executing the action
• Increase the “Delay before” value to allow time to the application to render entirely and become responsive at UiPath.UIAutomationNext.Activities.TargetCommonLogic.GetSearchResultAsync(IRuntimeContext runtimeContext, ITargetAnchorable target, CancellationToken token)
at UiPath.UIAutomationNext.Activities.NClick.UiPath.UIAutomationNext.Activities.IVerifyExecutionActivity.ExecuteAsync(IRuntimeContext context, IActivityData data, CancellationToken cancellationToken)
at UiPath.UIAutomationNext.Activities.Services.VerifyExecutionService.ExecuteWithVerifyAsync[T](IVerifyExecutionActivity activity, IVerifyExecutionRuntimeContext verifyContext, IRuntimeContext context, T data, CancellationToken token)
at UiPath.UIAutomationNext.Activities.NClick.ExecuteAsync(IActivityContextWrapper context, CancellationToken cancellationToken)
at UiPath.UIAutomationNext.Activities.TargetBase.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.UIAutomationNext.Activities.TargetBase.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NApplicationCard.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Please share the selectors you used in the Click activity (Click ‘Bobby Fischer’)

Sorry I cannot upload any file since my account if newly registerred.

The Click has only Strict Selector. No other selector. Its code is as below

SyntaxEditor Code Snippet

webctrl tag=‘TABLE’
webctrl aaname=‘CurrentRow("Collection Name").ToString’ tableRow=‘2’ tag=‘A’

try assigning CurrentRow(“Collection Name”).ToString first to a variable. Then on the selector editor, use the variable for the aaname… for example aaname={{variablename}}

Created a variable CurrentCollectionName
Name: CurrentCollectionName
Variable type: String
Scope: Do

Added an Assign in the Body of For Each Row in Data Table
Save to: CurrentCollectionName
Value to save: CurrentRow(“Collection Name”).ToString

Then I got an Runtime execution error as below:

24.2.1-beta.15932+Branch.release-v24.2.1.Sha.3f90483a69af341308fcab9ad25ddc1395738901.3f90483a69af341308fcab9ad25ddc1395738901

Source: Assign

Message: Expression Activity type ‘VisualBasicValue`1’ requires compilation in order to run. Please ensure that the workflow has been compiled.

Exception Type: System.NotSupportedException

System.NotSupportedException: Expression Activity type 'VisualBasicValue1' requires compilation in order to run. Please ensure that the workflow has been compiled. at System.Activities.Expressions.CompiledExpressionInvoker.InvokeExpression(ActivityContext activityContext) at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NApplicationCard.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

That is hard to spot but you would need to make sure that your quote marks are vertical quote marks. For example in the image below, you should have quotes like the one on the right
image

Corrected and there is no Runtime execution error now.
But still got below error message with Click.

24.2.1-beta.15932+Branch.release-v24.2.1.Sha.3f90483a69af341308fcab9ad25ddc1395738901.3f90483a69af341308fcab9ad25ddc1395738901

Source: Click ‘Bobby Fischer’

Message: Could not find the user-interface (UI) element for this action.

Possible solutions:
• Ensure application is opened and the UI element is visible on the screen at execution time
• Edit the Target of the UI activity and use Validation to debug the issue.
• If needed, re-indicate the element as its properties might have changed
• Use “Check state” activity to check the application state before executing the action
• Increase the “Delay before” value to allow time to the application to render entirely and become responsive

Exception Type: UiPath.UIAutomationNext.Exceptions.NodeNotFoundException

UiPath.UIAutomationNext.Exceptions.NodeNotFoundException: Could not find the user-interface (UI) element for this action.

Possible solutions:
• Ensure application is opened and the UI element is visible on the screen at execution time
• Edit the Target of the UI activity and use Validation to debug the issue.
• If needed, re-indicate the element as its properties might have changed
• Use “Check state” activity to check the application state before executing the action
• Increase the “Delay before” value to allow time to the application to render entirely and become responsive at UiPath.UIAutomationNext.Activities.TargetCommonLogic.GetSearchResultAsync(IRuntimeContext runtimeContext, ITargetAnchorable target, CancellationToken token)
at UiPath.UIAutomationNext.Activities.NClick.UiPath.UIAutomationNext.Activities.IVerifyExecutionActivity.ExecuteAsync(IRuntimeContext context, IActivityData data, CancellationToken cancellationToken)
at UiPath.UIAutomationNext.Activities.Services.VerifyExecutionService.ExecuteWithVerifyAsync[T](IVerifyExecutionActivity activity, IVerifyExecutionRuntimeContext verifyContext, IRuntimeContext context, T data, CancellationToken token)
at UiPath.UIAutomationNext.Activities.NClick.ExecuteAsync(IActivityContextWrapper context, CancellationToken cancellationToken)
at UiPath.UIAutomationNext.Activities.TargetBase.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.UIAutomationNext.Activities.TargetBase.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NApplicationCard.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@Richard_Chen

First of all table row 2 needs to be removed

And a much easier way would be to use for each ui element directly

Cheers

Update:
I used For each UI element instead, as suggested, and the issue is resolved.
Thanks UiPath.

Richard

1 Like

@Richard_Chen

glad it helped

please close the topic if resolved…else happy to help

cheers

You have to do:

"<webctrl tag='TABLE' /><webctrl aaname='" + CurrentRow("Collection Name").ToString + "' tablerow='2' tag='A' />"

The way you have it, CurrentRow is not being evaluated because you have it inside the string. And then the " in CurrentRow(“Collection Name”).ToString breaks the quote pairs.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.