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

WPF Application: Assign value in gridviewcell and perform verification

1 Answer 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Darshana asked on 02 Dec 2013, 07:50 PM

Right Now I am working with WPF Application and I spent a lot of time to do some verification, but no success. Help me to do Automation with WPF Application. Our application is not Silverlight it's WPF Application.

Manual testing steps Are:
1) Take value of CurMktVal of one Perticular Fund. 
2) then Enter Value to Proposed alloc Amt ,say $ 50000.
3) Now Value of CurMktVal should be = Value from step 1 + Value From Step 2.
4) Also Want to check for footer Value as well.
5) Compare value of New CurMktVal and New Footer value

Code I tried for step 2 is:

 Telerik.WebAii.Controls.Xaml.Wpf.GridViewCell gCell = ActiveApplication.MainWindow.Find.ByAutomationId<CellElement65Textbox>("CellElement65Textbox");
            var PropAlloc = "50000";
            gCell.Text = PropAlloc;

Let me know how Should I perform all these Actions. 

Please help me soon, So I can start working on this. I am stuck here.

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 05 Dec 2013, 09:27 PM
Hi Darshana,

When you set the value for gCell, you should reference the recorded element in code like this:

Telerik.WebAii.Controls.Xaml.Wpf.GridViewCell gCell = Applications.WPF_Demosexe.Ledgex_Studio__BOFAmerica__Product_groupArbitrage_Products.ContentTextblock;

Notice how the element is named the same way that it is arranged hierarchically in the Elements Explorer. By referencing an element this way, you’ll take advantage of Test Studio’s existing find logic for the element.

For more information on referencing elements in code, you can review this document: How to Reference an Element in Code.

Try referencing your element's this way. Let us know if you continue to have issues. 

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