Hello,
I am working on windows based application, i need to read data from excel and click in my application (datagrid ), Final job is to click, the selector code for click is based on Row number
e.g:
In the above excel, i need to capture cell value for the column:Selected & compare with other columns: Row Num & Option Name. Click matched row finally
My idea is to read selected value (from excel) in a variable, compare with other 2 columns and find out the matching row number and click the row number.
i need to modify the selector code for click event , please help how to proceed.
Thanks in advance.
As I don’t have access to your web app, this is incomplete. You will need to indicate:
The target for the FindChildren activity, namely, your application table which you will be attempting to click. This will generate a table of selectors for you to analyse further into the workflow. This may need to be surrounded by an ‘AttachBrowser’ or ‘AttachWIndow’ depending on the nature of your app.
The final click activity will also need to be surrounded by an ‘AttachBrowser’ or ‘AttachWIndow’ if required.
The workflow takes the list of possible selectors and where a match between ‘Selected’ and ‘OptionName’ is found, looks for the corresponding matching RowNumber. If it finds this, (“ctrl name=”+RowNumber) then it will click that selector and move onto the next transaction item to process.
Hi ronanpeter,
Thank you , my application is windows based stand alone, i did not understood your solution, could you please elaborate more , i have the below doubts:
Where is the input capturing (we have an excel file)
How do I find the child elements for the datagridview. My selector is as follows:
I tried with wnd ctrlname = FrameDeptGridView & ctrl name Datagridview but it is not returning any children elements as rows.
I debugged the sequence and checked but no children are returned into lstChildren.
I placed the FindChildren & Foreach activities inside Attach Window.
I have used a generate datatable just for this example, however, you should replace that with your own input data through a read range on your excel for example.
You should click on the ‘indicate on screen’ option and highlight your full datagrid on the application.
Ensure that there are individual element for the values you are looking to click and that that the table is not just one single element. There should be at least one element returned to lstChildren if you have highlighted the datagrid as directed. However, as we want all descendants of that element, there should be more. The end result should be a table containing all element selectors for further analysis.
Your For Each loop should provide the details of the various elements in the datagrid.
So if a certain part of the datagrid is clickable, that is, it has its own selector, you can see what these selectors look like using for ForEach loop:
Yes, I was able to loop into the elements list, but I cannot find the data inside the grid element. When I debugged the sequence the element only consists of
UiElement[1]
{
UiElement
{
ClippingRegion=null,
Selector="
< wnd app=‘winquote.exe’ ctrlname=‘TMMVGForm’ />
< wnd app=‘winquote.exe’ ctrlname=‘TMMVGForm’ />
< wnd ctrlname=‘panel20’ />
< wnd ctrlname=‘panel3’ />
< wnd ctrlname=‘tmmvgTab’ />
< wnd ctrlname=‘OptionsTabPage’ />
< wnd ctrlname=‘panel5’ />
< wnd ctrlname=‘optionDetailsTab’ />
< wnd ctrlname=‘FrameDeptOptionsTabPage’ />
< wnd ctrlname=‘FrameDeptGridView’ />"
}
}
How can I find the data inside the grid?
It looks like your datagrid is being rendered as a single element, rather than a collection. Two ways to check for sure. First, change the scope of the FindChildren activity to ‘Find_Children’. What is the output when you write the selectors to string as before?
Second, use the UiExplorer to click on a specific value in your datagrid. What does the selector look like? Does it allow you to click on the individual elements as you need?