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

How to extract the value directly in C#?

1 Answer 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jerry
Top achievements
Rank 1
Jerry asked on 28 Jan 2013, 11:08 PM

Hi

I am new to Telerik and our team is doing some survey about Telerik Test Studio and if it can be integrated with Visual Studio, it is great.

I would like to know if it is possible to extract the value via C#.

I use Telerik test studio to record the test , extract the value and generate it to the following coded step in Pages.g.cs . But Extraction step doesn’t generate to the coded step (I know some posts say I need to use .tstest to do data binding, but that's not what we want)

public ArtOfTest.WebAii.Controls.HtmlControls.HtmlTableCell x1329TableCell

            {

                get

                {

                    return Get<ArtOfTest.WebAii.Controls.HtmlControls.HtmlTableCell>("TextContent=13.29", "tagname=td");

                }

            }

Because the value (yellow) is dynamic, is there any way to get the value directly via C#? How to rewrite the above function and make it work?  :)


Thanks,

1 Answer, 1 is accepted

Sort by
0
Mario
Telerik team
answered on 01 Feb 2013, 08:34 AM
Hello Jerry,

Thank you for choosing to evaluate Test Studio.

Please see this article for how to Get/Set Extracted Variables in Code. Note: since the TextContent we are looking to extract from this object is dynamic, we wouldn't want to use it as part of the find logic.

Greetings,
Mario
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Jerry
Top achievements
Rank 1
Answers by
Mario
Telerik team
Share this question
or