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

Extract temporary data from textblock

2 Answers 46 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.
Mostafa
Top achievements
Rank 2
Mostafa asked on 06 Aug 2012, 10:28 AM
hi telerik Team,

i need to extract a temporary value from a textblock to realtime in a Loop more than one time. The value change dynamically over the time in the Textblock. How can I read the temporary value ??
do you have any suggestions??

Thanks for your help

2 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 08 Aug 2012, 09:00 PM
Hello Mostafa,
would you please provide some additional details on your automation challenge.

You can easily keep re-getting the value from a single textblock. For instance:
SilverlightApp sl = ActiveBrowser.SilverlightApps()[0];
TextBlock b = sl.Find.ByAutomationId<TextBlock>("someId");
 
String temporaryValue = null;
 
for(int i=0;i<30;i++) {
 temporaryValue = b.Text;
}

Unfortunately, I cannot offer further assistance without additional information on your usecase. I hope you find this sample useful.

Regards,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mostafa
Top achievements
Rank 2
answered on 09 Aug 2012, 09:05 AM
thank you for your Replay.

I have the solution now :)
Tags
General Discussions
Asked by
Mostafa
Top achievements
Rank 2
Answers by
Stoich
Telerik team
Mostafa
Top achievements
Rank 2
Share this question
or