This is a migrated thread and some comments may be shown as answers.

Assert if a row is selected in Telerk grid

1 Answer 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sudha
Top achievements
Rank 1
Sudha asked on 27 Jul 2016, 08:00 AM

Hi,

I need to test if a row is selected in a Telerk Grid using Telerik Test Framework. Below is the snippet of code I'm trying. 

  public bool HasRowSelected(IFrameworkElement row)
  {
      return row.Find.ByName<Rectangle>("BackgroundBorder").Opacity > 0;
  }

However it doesn't seem to work. Could you please suggest how can I achieve this? Attached is the sample grid.

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 01 Aug 2016, 07:00 AM
Hi,

As I understand if the row is selected then its opacity is bigger then 0? I am a right.

Here is an example how you can verify a CSS style. You should first find the row and then verify the style (i.e. opacity).

If you can grant me a direct access to the grid or create some example I can help you with the code.

Thank you!

Regards,
Boyan Boev
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Sudha
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or