Hi,
I need to insert data in the a table. When try to do a data-driven approach using csv, all the values are inserted in the single cell i.e. 1st column 1st row. Instead I need to insert data in 1st row, 2nd row, 3rd row and so on..
Below are the repository items which are identified for each row when I tried the record and playback. Instead of having to capture multiple elements to insert data in multiple rows, I need a simple way. Is there a way to achieve this using user code? (I am new to Ranorex)
container/element[2]/container[@caption='']/container[@automationid='PART_LayoutPanel']/row//text[@automationid='NameAID']
container/element[3]/container[@caption='']/container[@automationid='PART_LayoutPanel']/row//text[@automationid='NameAID']
container/element[4]/container[@caption='']/container[@automationid='PART_LayoutPanel']/row//text[@automationid='NameAID']
How to insert data in WPF data grid whose row's xpath is changing
-
- Posts: 1
- Joined: Tue Apr 11, 2023 12:05 pm
Re: How to insert data in WPF data grid whose row's xpath is changing
Hi, you could consider parameterizing the element path itself and including those variables in the csv:
container/element[$rowid]/container[@caption='']/container[@automationid='PART_LayoutPanel']/row//text[@automationid='NameAID']
Not sure where the column is defined, but a similar approach could work, so you keep 1 or 2 repository elements with dynamically changing paths.
container/element[$rowid]/container[@caption='']/container[@automationid='PART_LayoutPanel']/row//text[@automationid='NameAID']
Not sure where the column is defined, but a similar approach could work, so you keep 1 or 2 repository elements with dynamically changing paths.