How to do text verification point in silktest for a
specific content.Suppose in the text editor, i have typed
some "aaaa,bbbb,cccc,dddd" in different lines. now i want
to capture only aaaa of first line from the text editor.
How can i do it.Can any one help me.

Answers were Sorted based on User's Feedback



How to do text verification point in silktest for a specific content.Suppose in the text editor, i..

Answer / jinsha

store the string in a text variable as
string a="aaaa,bbbb,cccc,dddd"
print (getfield("/",a,1,4)
this captures only aaaa

Is This Answer Correct ?    3 Yes 0 No

How to do text verification point in silktest for a specific content.Suppose in the text editor, i..

Answer / nikhil

store the text in a string variable.
say STRING sContent = "aaaa,bbbb,cccc,dddd"
Now use getfield(sContent,',',1) which captures only aaaa.

Is This Answer Correct ?    2 Yes 0 No

How to do text verification point in silktest for a specific content.Suppose in the text editor, i..

Answer / samar

use this sample code ..

pass the string as parameter in Check_PDF method.
Parameter whichever string you want to
retrive/display/verification.

Check_Pdf("aaaa")

[-] Check_PDF(LIST OF STRING lspdfcheckpoint)
[ ] WaitForControl(Gold_Orders.ViewOrderForm)
[ ] // main window - Gold_orders
[ ] // OrderForm - Pdf form
[ ] Gold_Orders.ViewOrderForm.Click()
[ ]
[-] if (OrderForm.Exists())
[ ] WaitForControl(OrderForm)
[ ]
[ ] STRING Items
[ ]
[ ] Clipboard.SetText({""})
[ ] OrderForm.TypeKeys("<Ctrl-a><Ctrl-Insert>")
[ ] LIST OF STRING OrderForm_Order = Clipboard.GetText()
[ ] STRING Line
[ ] BOOLEAN Found = FALSE
[-] for each Line in OrderForm_Order
[-] for each Items in lspdfcheckpoint
[ ]
[-] if MatchStr("*" +Items + "*", Line)
[ ] Found = TRUE
[-] if (Found)
[ ] Print ("PASS:" +Items + "Item found on the OrderForm")
[ ] Print("String Verification : "+Items)
[-] else
[ ] LogError ("FAIL:" +Items + "Item not found on the
OrderForm")
[ ] //Close SRF
[ ] OrderForm.TypeKeys("<Alt-F4>")

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Silk Test Interview Questions

How can you read the contents of PDF using silktest?

2 Answers  


I have Silk Test 7.5 installed to my machine. My silk recoginizes all the windows applications.But its not recoginizing the web application.When i try to ENABLE EXTENSION for any web application i am not getting the window with the two radio button namely DOM and VO. What could be the problem? I also tried using browsers like IE,FF and also uninstalled the silk n reinstalled it again.But it works out with my neighbours system....Wht could be the problem?????

3 Answers   Borland, Genpact,


How to test your defaultbasestate?

0 Answers  


How to create a new silktest project?

0 Answers  


Define PEER Review ,what it contains & What we discuss in that meeting.

2 Answers  






How do you create a user defined class in silk?

2 Answers  


How can i used If Else statement in Silk Test. And my table name is login how can i get rowcount in the table having

1 Answers  


What is the wait statement in Silktest?

4 Answers   CTS, IBM,


What is the segue testing methodology?

0 Answers  


How to create a test frame?

0 Answers  


What is silktest host?

0 Answers  


Where are the testplan attributes stored?

0 Answers  


Categories