How to use some Vbscript functions like 'Mid', 'Split' and 'Len' in the New Coded Step?

4 posts, 0 answers
  1. Luqing
    Luqing avatar
    1 posts
    Member since:
    Apr 2012

    Posted 24 Apr 2012 Link to this post

    Hi Telerik team,

    When I want to deal with one srting, just like split it or get the length of it, I use the function like 'Mid', 'Split' and 'Len'. But these cannot work.
    Following is the error message that displays in the Log:
    (BC30451) 'Mid' is not declared. It may be inaccessible due to its protection level.

    So, how to deal with this issue?
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 26 Apr 2012 Link to this post

    Hello Luqing,

    Use Substring instead (see here for more information):

    string s = "Telerik Test Studio";
     
    Log.WriteLine(s.Length.ToString());
    Log.WriteLine(s.Substring(8, 11));

    If you prefer Visual Basic, use our code converter.

    Kind regards,
    Anthony
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Pankaj
    Pankaj avatar
    4 posts
    Member since:
    Jul 2018

    Posted 16 Jul Link to this post

    Hi Guys, 
    I was trying to perform some Keyboard operations (Key Press and Tab etc) in sample CRM application provided by Telerik using telerik test studio v 2018.2. 

    I have recorded the case and when i am compiling the coded file its giving me below error :

    D:\Users\patiwari\Documents\Test Studio Projects\PracticeTelerik\WPFTest.tstest.vb(62,0) : error BC30451: 'Keys' is not declared. It may be inaccessible due to its protection level.
    D:\Users\patiwari\Documents\Test Studio Projects\PracticeTelerik\WPFTest.tstest.vb(65,0) : error BC30451: 'Key' is not declared. It may be inaccessible due to its protection level.

    Also attaching the screenshot of my code file

    Can anyone help me into this how i can resolve this issue. 
    Many Thanks in Advance..

  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    971 posts

    Posted 17 Jul Link to this post

    Hello Pankaj,

    Since your current question duplicates another post of yours I would like to kindly ask you to refer to the other forum thread for further details. Thanks in advance! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top