Imagine you have a string variable that holder a credit
card (16digit). There are multiple ways of obtaining last
four digits of this number programmatically on a run time.
Name one; for practical purpose variables name is sCCnumber?
Answers were Sorted based on User's Feedback
Answer / smitha
Use Right function
sSubstring = Right (sString, iNumChars)
Eg. sCCnumber = "123456786543245"
Print ( right (sCCnumber ,4)
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ruchi
String sCCnumber = "123456786543245"
sCCnumber=Substr(sCCnumber,12,4)
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sateesh_t7101@yahoo.co.in
i think use Edit_get_selection
if wrong plz ....
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / uday kumar. a
Just use the mod operator.
Say x=1234567
then modValue=x mod 10000
The modValue has a value of 4567
Another technique is by using substring function.
Try solution for substring function
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vimalkanth
Try using stuff method. The examples defined in help are
good enough.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to include a test case into a testplan?
what is the statment/command for invoke the browser from script
What is silktest agent?
procedure or steps to do silk test? clearly
can we test the application by inserting checkpoints using silktest as we do in qtp and winrunner and also what are the automation frameworks in silktest
Define PEER Review ,what it contains & What we discuss in that meeting.
How to write the good frame work for application.
what is silk testing?
I'm involved in automation using silk test of an swing application running in a browser. There is a window whose name is a dynamic. i.e based on the input(eg: some filename) the window name keeps on changing. I need to capture the window name for every run of silk test case for different input filenames. I'm aware of GetName() in SilkTest, but its not working for me. Can anybody suggest me any logic to achieve this using silktest?
How to select a group of test cases in a testplan to run?
How to specify a browser extension to a web application?
What is a test frame?