I want to get and count number of rows

I have installed software when i search any anything. No. of rows found existence more than one then i have to get total number of count rows and click first then open one popup window after update close window then click on next row.

How will i click first row then second row then third row any number of time row exist click function work on those rows.

given below
CountRow

First Row code is:-

 <wnd app='wwwOne.exe' ctrlname='ShellForm' />
 <wnd ctrlname='RootDeckWorkspace' />
 <wnd ctrlname='FindView' />
 <wnd ctrlname='findContentWorkspace' />
 <wnd ctrlname='WorkFileSearchResultsView' />
 <wnd ctrlname='searchResultsControl' />
 <wnd ctrlname='resultsPanel' />
 <wnd ctrlname='configurableDataGridView' />
 <ctrl name='DataGridView' role='table' />
 <ctrl name='Row 0' role='row' />
 <ctrl name=' Row 0' role='cell' />

Second Row Code is:-

<wnd app='wwwOne.exe' ctrlname='ShellForm' />
<wnd ctrlname='RootDeckWorkspace' />
<wnd ctrlname='FindView' />
<wnd ctrlname='findContentWorkspace' />
<wnd ctrlname='WorkFileSearchResultsView' />
<wnd ctrlname='searchResultsControl' />
<wnd ctrlname='resultsPanel' />
<wnd ctrlname='configurableDataGridView' />
<ctrl name='DataGridView' role='table' />
<ctrl name='Row 1' role='row' />
<ctrl name=' Row 1' role='cell' />

hi @pankajs3
assign count variable as interger

  1. put while loop
  2. inside use click activty
    selector for last two line is common is <ctrl name=‘Row ‘“+count.tostring+”’’ role=‘row’
    <ctrl name=’ Row ‘“+count.tostring+”’’ role=‘cell’

increment the counter value

Not working. Giving Error.
19.4.2+Branch.master.Sha.e17a3bedca2a7da0d0b716b5f8f765d1d5ef1ddc

Source: Double Click

Message: The target Element was not specified for this activity. You should set its Target property or use this activity inside of a scope activity (Attach Browser, Open Browser, Open Application, Attach Window, Get Active Window, Element Scope activities).

Exception Type: UiPath.Core.Activities.ElementNotSetException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.Activities.ElementNotSetException: The target Element was not specified for this activity. You should set its Target property or use this activity inside of a scope activity (Attach Browser, Open Browser, Open Application, Attach Window, Get Active Window, Element Scope activities). ----> UiPath.Core.UninitializedNodeException: The UiElement is not initialized ----> System.Runtime.InteropServices.COMException: Uninitialized UI node.
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector, IVariableResolver resolver)
— End of inner ExceptionDetail stack trace —
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector, IVariableResolver resolver)
at UiPath.Core.Activities.Target.FindByElement(UiElement targetElement, String fromSelector, IVariableResolver resolver)
at UiPath.Core.Activities.Target.<>c__DisplayClass39_0.b__2()
at UiPath.Core.Activities.Target.GetElement(Func1 findMethod, Nullable1 delayBefore, Region clippingRegion, Boolean highlight, Boolean isClippingRegionNormalized)
at UiPath.Core.Activities.Target.<>c__DisplayClass37_0.b__0()
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of inner ExceptionDetail stack trace --- at UiPath.Core.Activities.TaskAsyncCodeActivity1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

try this,
<ctrl name=‘Row"+count.tostring+“’ role='row’
<ctrl name=’ Row”+count.tostring+"’ role=‘cell’

@pankajs3

i hope u tried this all selector not that only 2 selector.it is right?
<wnd app=‘wwwOne.exe’ ctrlname=‘ShellForm’ / >
<wnd ctrlname=‘RootDeckWorkspace’ / >
<wnd ctrlname=‘FindView’ / >
<wnd ctrlname=‘findContentWorkspace’ / >
<wnd ctrlname=‘WorkFileSearchResultsView’ / >
<wnd ctrlname=‘searchResultsControl’ / >
<wnd ctrlname=‘resultsPanel’ / >
<wnd ctrlname=‘configurableDataGridView’ / >
<ctrl name=‘DataGridView’ role=‘table’ / >
<ctrl name=‘Row ‘“+count.tostring+”’’ role='row’ / >
<ctrl name=’ Row ‘“+count.tostring+”’’ role='cell’ / >

Check your quotations. I think you have a mistake.
If the selector is supposed to be <ctrl name='Row 1' role='row'>
Then, it should be like this:
<ctrl name='Row "+count.ToString+"' role='row'>

Also, output this string in a Write Line or Message Box if you are uncertain it is correct, and match it with what UiExplorer shows for the selector.

EDIT: sorry, this was also meant for @pankajs3

Regards

@amaresan Thanks bro it works for me