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

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

3 Answers 300 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luqing
Top achievements
Rank 1
Luqing asked on 24 Apr 2012, 10:33 AM
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?

3 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 26 Apr 2012, 05:24 PM
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
0
Pankaj
Top achievements
Rank 1
answered on 16 Jul 2018, 01:45 PM

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..

0
Elena
Telerik team
answered on 17 Jul 2018, 03:11 PM
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!
Tags
General Discussions
Asked by
Luqing
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Pankaj
Top achievements
Rank 1
Elena
Telerik team
Share this question
or