Extract temporary data from textblock

3 posts, 0 answers
  1. Mostafa
    Mostafa avatar
    22 posts
    Member since:
    Aug 2012

    Posted 06 Aug 2012 Link to this post

    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. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 08 Aug 2012 Link to this post

    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
  3. Mostafa
    Mostafa avatar
    22 posts
    Member since:
    Aug 2012

    Posted 09 Aug 2012 Link to this post

    thank you for your Replay.

    I have the solution now :)
Back to Top