Ranorex.Text identified but not clicked
Posted: Wed Nov 06, 2013 7:30 am
I have the following table structure withing a Silverlight application
I try to set the value for the text field in Row2, Col2 with TryFindSingle on the row (which is identified before) i.e.
This returns "Setting attribute 'text' failed on element '{Text:TextBlock}'. The operation is not supported". Well, I know I have to click on the cell before I can set the value. Unfortunately moves the mouse to the upper left corner of the screen.
On the other hand, If I click the cell manually and then run the above code, the cell value is set properly. So why the cell is not clicked as expected?
Code: Select all
Table 'objTable'
+-Row 'ColumnHeadersPresenter'
+-Element 'RowsPreseneter'
+-Element 'Row1'
+-Element 'Col1'
+-Text
+-Element 'Col2'
+-Text
+-Element 'Row2'
+-Element 'Col1'
+-Text
+-Element 'Col2'
+-Text
Code: Select all
Ranorex.Text cell;
rows[1].TryFindSingle("./element[2]/text", out cell);
cell.TextValue = "test"
Code: Select all
cell.Click()
On the other hand, If I click the cell manually and then run the above code, the cell value is set properly. So why the cell is not clicked as expected?