Page 1 of 1

Not able to get the values of the table cells

Posted: Tue Feb 24, 2015 10:34 am
by NishantSingh
Hi,

I am using windows 7 OS, Ranorex Studio 5.2 and working on the Windows application created using .NET framework.

In the Application there is a table in which the 2nd column contain the color name and this is a dropdown control embedded on the table row. Color name is displayin on UI and even able to select different color from there but I need to get the name of the color displaying on the table for all rows. but I am not able to do that please help me out.


Attaching the table screenshot and snapshot


Regards,
Nishant Singh

Re: Not able to get the values of the table cells

Posted: Wed Feb 25, 2015 6:05 pm
by Support Team
Hi Nishant,

Could it be that the information is encoded in the AccessibleDescription of the specific cells of this table

Code: Select all

/form[@controlname='WorkflowWizard']/container[@controlname='contentPanel']//container[@controlname='wizWizard']//container[@controlname='gvRoles']/table[@accessiblename~'^Telerik\.WinControls\.UI\.Ra']
?

In case this shouldn't help please take a look at the following post where a similar issue was described: http://www.ranorex.com/forum/devexpress ... t3372.html.

Regards,
Markus

Re: Not able to get the values of the table cells

Posted: Wed Feb 25, 2015 8:09 pm
by odklizec
Hi,

I checked the snapshot and the color information you want to get seems to be only available in the selected row (inside the text element). So in my opinion, you will have to create a method, which will go through all rows, select each of them and then you should be able to access the text element, containing the color value you want to read.

Re: Not able to get the values of the table cells

Posted: Thu Feb 26, 2015 7:12 am
by NishantSingh
Hi Markus,

The post is not helpfull for my application and in AccessibleDescription I only find the color Code in form of the number and not the exact text.

PFA the screenshot.

please just let me know whether I could be able to extract the exact text or not ?

Re: Not able to get the values of the table cells

Posted: Thu Feb 26, 2015 7:18 am
by NishantSingh
Hi Pavel Kudrys,


I have method to go though all row even each cells but I am not able to able any text value its blank I dnt know exactly which property you are talking about please PFA the scrren and let me know is there any property which is having the color name text that I culd be able to use to capture the value


Regards,
Nishant Singh

Re: Not able to get the values of the table cells

Posted: Thu Feb 26, 2015 8:10 am
by odklizec
Hi,

The problem is that you need to physically select (click) each row to make the appropriated text element available. The test element containing the color value is not a part of "color" cell, but it's a child element of ComboBox! And the ComboBox is most probably available only if the row is selected? Hence you need to select each row and only then you may be able to read the color value? Just try to manually select the table row (different than first row) and examine its content in spy.

Check this path:

Code: Select all

/form[@controlname='WorkflowWizard']/container[@controlname='contentPanel']//container[@controlname='wizWizard']//container[@controlname='gvRoles']/table[@accessiblename~'^Telerik\.WinControls\.UI\.Ra']/row[@accessiblename~'^Row\ 1\ Column\ Color\ Value\ ']//text[@accessiblerole='Text']
ColorText.png
Hope this helps?

Re: Not able to get the values of the table cells

Posted: Fri Feb 27, 2015 5:32 am
by NishantSingh
Hi Pavel Kudrys,

Thanks for explaining this and yes you are right but actually when we click on the color cell all the dropdown values are getting displayed because of this I don't want to do this way and I was searching if there is any other way we could able to do it like without clicking on the cell. But I think I have no other way and should be doing it by clicking on the cell.

Regards,
Nishant Singh

Re: Not able to get the values of the table cells

Posted: Fri Feb 27, 2015 6:58 am
by odklizec
Hi,

Can't you just click in another column to select the row (for example Role Name)? Simply click anywhere in row, where no action is triggered by the click. Or check if there is a way to use select/set focus action directly to row?

Re: Not able to get the values of the table cells

Posted: Wed Mar 04, 2015 4:48 am
by NishantSingh
Hi,

Thanks for the suggestion but by clicking anywhere in the row not able to get the value from the color name column so to avoid the list coming up from the color name column and to get the values from the column I am using the double click by which I am able to set the focus on the combobox and get the selected value without the list showing up.


regards,
Nishant Singh