Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Performing selection of a row on Infragistics Grid in Silverlight App Using QTP 10.0 (having Sliverlight Add-in)
posted

We have a customised infragristics grid in a siliver light application. The version of Sliverlight Application is 4.0

We are trying to select a row of this grid using QTP 10.0 having silver light add-in. We are sucessful in derriving row values of .IsSelected and .Is Active in following way -

msgbox Browser("iLocates").Page("iLocates").SlvWindow("Shell").SlvObject("LocatesGrid").Object.DataContext.LocatesGrid.Rows.Item(0).IsActive

Above code gives "False" when the row is not clicked and "True" when the row is clicked.

msgbox Browser("iLocates").Page("iLocates").SlvWindow("Shell").SlvObject("LocatesGrid").Object.DataContext.LocatesGrid.Rows.Item(0).IsSelected

Above code also, gives "False" when the row is not clicked and "True" when the row is clicked.

But when we try to use the QTP script to set it to Active or Selected using either of following code

Browser("iLocates").Page("iLocates").SlvWindow("Shell").SlvObject("LocatesGrid").Object.DataContext.LocatesGrid.Rows.Item(0).IsActive = True

OR

Browser("iLocates").Page("iLocates").SlvWindow("Shell").SlvObject("LocatesGrid").Object.DataContext.LocatesGrid.Rows.Item(0).IsSelected = True

We get following exception [Arg_ArgumentException]

Arguments:

Debugging resource stringsare unavailable. Often the key and arguments provide sufficient information to diagnose the problem see http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50917.0&File=mscorlib.dll&Key=Arg_ArgumentException

Line (60):  "Browser("iLocates").Page("iLocates").SlvWindow("Shell").SlvObject("LocatesGrid").Object.DataContext.LocatesGrid.Rows.Item(0).IsActive = True"

Seeking you advice in this case.