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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to open an existing silktest project?

661


What is defaultbasestate?

715


How to define an object verification in a test case?

711


How to record a test case?

674


What is the standard flow of execution of a test case?

621






How to create a new silktest project?

671


What are the default testplan attributes?

711


How to create and edit a testplan?

656


How to create a test frame?

716


What is silktest project?

643


How to run all test cases in a testplan?

712


How record a test case into a testplan automatically?

661


Where are the testplan attributes stored?

649


What is the syntax of ui object identifier used by dom extension?

685


How to test your defaultbasestate?

691