Ranorex.Text identified but not clicked

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
lasombra
Posts: 14
Joined: Tue Mar 04, 2008 1:36 pm

Ranorex.Text identified but not clicked

Post by lasombra » Wed Nov 06, 2013 7:30 am

I have the following table structure withing a Silverlight application

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
I try to set the value for the text field in Row2, Col2 with TryFindSingle on the row (which is identified before) i.e.

Code: Select all

Ranorex.Text cell;
rows[1].TryFindSingle("./element[2]/text", out cell);
cell.TextValue = "test"
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

Code: Select all

cell.Click()
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?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex.Text identified but not clicked

Post by Support Team » Thu Nov 07, 2013 2:32 pm

First of all, could you please post a Ranorex snapshot of your application, please? Thank you!

When you track the text element under the "Row 2 Col2" element with Ranorex Spy, are the element rectangles correct then? You can easily verify that by turning on the Element Highlighting.

Another thing you can try is to invoke the actions (setting the text and clicking) on the Col2 element instead of text element. I.e. in your code, just remove the "/text" part of the RanoreXPath used in your code.

Regards,
Alex
Ranorex Team
.
Image

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: Ranorex.Text identified but not clicked

Post by AccidentReport » Thu Jan 30, 2014 12:38 pm

This sounds very similar to an issue I'm having. Was there a solution?!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex.Text identified but not clicked

Post by Support Team » Fri Jan 31, 2014 10:32 am

Hi AccidentReport,

There is no solution at the moment because we didn't get an answer.
Can you please describe your issue in more detail and answer the questions Alex asked?

Regards,
Bernhard
.
Image