key to highlight the menu bar and then arrows to the desired menu item. Try something out: Drive your application to the state before the menu selection. Now manually type F-10 or Alt and see if the menu highlights and allows you to arrow to the menu item. I'm guessing that it is probably a ChildWin or DialogBox that is really holding the focus and not passing the keyboard events to the MainWin. If this is the case, you need to explain to the developers that they need to enable this so that you can continue with your automated testing. A trick around this problem is to do a YourProduct.Click () to force the focus to the MainWin and then do the menu selection (YourProduct.File.Exit.Pick())
9. What is SilkTest project?
A SilkTest project is a collection of files that contains required information about a test project.
10. How to create a new SilkTest project?
- Run SilkTest.
- Select Basic Workflow bar.
- Click Open Project on the Workflow bar.
- Select New Project.
- Double click Create Project icon in the New Project dialog box
- One the Create Project dialog box, enter your project name, and your project description.
- Click OK.
- SilkTest will create a new subdirectory under SilkTest project directory, and save all files related to the new project under that subdirectory.
11. Is There any function for word count of web page is available in the SilkTest??
You can use Clipboard functions. Get All the contents by Ctrl+a & ctrl+C. Then parse the List of sting ...
12. What is a SilkTest Testplan?
The SilkTest testplan is an outline that provides a framework for the software testing process and serves as the point of control for organizing and managing your test requirements. A testplan consists of two distinct parts: an outline, which is a formatted description of the test requirements, and statements, which are used to connect the testplan to SilkTest scripts and testcases that implement the test requirements.
13. What's the best way to create a new test script?
In Automation; creating test scripts involves basically two step:
1. Creating Test Data for all test cases.
2. Writing scripts for automating the test cases.
The first steps, is the outcome of analysis of what all data is required for all of your testcases to be executed. These all should be collected and scripts to be written so that TEST DATA is ready.
The second steps, is basically the test case execution steps automation.
14. How to get button caption?
Answer1:
Use GetCaption () method......
Answer2:
Either use "sCaption" Property or "GetCaption" Method
Syntax - ControlName.sCaption
or use GetCaption () Method
Syntax - ControlName.GetCaption ()
14. How to close unexpected window??
You meant to say one more browser window (Order Request) appearing apart from original window (Order Status)?
Answer1
If Order Request window is a popup.
Following code closes the active browser window if it is a popup:
[-] !(if Browser.ComboBox("#1").exists())
[ ] Browser.SetActive()
[ ] Browser.typekeys("
")
Answer2
If Order Request window is a Browser window.(not a popup)
You can use the following code to close unwanted Browsers(like Order Request)
Order_Status.SetActive()
Browser.CloseOthers()
15. What are the types of text lines in a testplan file?
A testplan file contains text lines. There are 5 types of text lines in a testplan file:
- Comment - Marked in green color: Providing commentary information.
- Group descriptiton - Marked in black color: Providing descriptions for groups of tests. Tests in a testplan can be grouped into multiple levels of groups.
- Test description - Marked in blue color: Providing descriptions for individual test.
- Testplan statement - Marked in dark red color: Providing relations to link scripts, testcases, test data, closed sub testplans or an include file to the testplan.
- Open subplan file marker - Marked in magenda color: Providing relations to link sub testplans to be included in a master testplan.
Continues in next page
16. What are testplan attributes?
Testplan attributes are user defined characteristics to be associated with test group descriptions and/or test descriptions. You search, identify, and/or report test cases based on values of the different attributes.
17. What are the default testplan attributes?
SilkTest offers you 3 predefined default attributes:
- Category: The type of testcase or group of testcases. For example, you can use this attributes to categorize your test groups as "Boundary value tests", "Navagation tests", etc.
- Component: The name of the application modules to be tested.
- Developer: The name of the QA engineer assigned to develop the testcase or group of testcases.
How to maintain recovery system?
In your TestCaseExit () function you can incorporate like
If condition == 1
do this
If condition == 2
do that
18. How to define new testplan attributes?
- Make sure your test project is open.
- Click Testplan/Define Attributes menu. The Define Attributes dialog box shows up. You should see 3 predefined default attributes: Category, Component, and Developer.
- Click the New button. The New Attribute dialog box shows up.
- Enter a name for your new attribute. For example: "Level" to indicate the complexity level of test cases.
- Select an attribute type: Normal, Edit, or Set.
- Click OK.
19. Retrieve text from disable textfield.Silk is not recognizing that disable object. How can I come to a conclusion?
Retrieve text from disable textfield.Silk is not recognizing that disable object. How can I come to a conclusion? I am having a web based application. In one web page there is a radio button.Selection of that radio button open an applet window. Now if I want to take the declaration of that window, It fails to recognise the same.Silk is properly configured to recognise Java based C\S application.How to resolve such issues?
If you want to retrieve data from a disabled textfield, you should first disable the Agent option "OPT_VERIFY_ENABLED" and the you can use GetText. The steps are:
Agent.SetOptions("OPT_VERIFY_ENABLED", false)
Print(TextField.GetText())
And coming to your next question, the answer is same, disable all the Agent options. Steps:
1.In the Options menu, click on Agent menu item.
2. In Agent Options window, click on Verification tab.
3. Uncheck all the options, except the last one (verification of application ready)
4. Click OK.
20. When invoking the java application there the application is getting invoked ...
When invoking the java application there the application is getting invoked (that is silk test is able to start my java apllication) and then comes login screen but silk Test is giving error JavaMainWin not found.
Why ? it is not coming out of invoke and excuting other part of code like entering username & password to login in that application.
Answer1:
After Invoking the application, Silk waits till it can find the application...In this case the application is your java window....
Sometime it happens that after invoking, silk is unable to recognize but if you invoke manually it works fine...
Solution:
Declare a window variable and use start method.
Now you might using the code
JavaAppWindow.Invoke ()
Instead of this do the following
Window MyJavaApp
MyJavaApp.Start ("path of exe or batch file to invoke the application")
sleep (x) (x --> appropriate value)
Answer2:
window MainWin MyWin // declare as global
main ()
try ()
testcase try () appstate none
MyWin.Start(sPath)
Answer3:
When you give start command as a part of JavaMainWin, ensure that your class path is running independantly - outside the Silk. It should work fine from JavaMainWin as well.
21. I am investigating solutions for automating an 'Invisible' Application and believe that using a Grid may solve many of my problems ...
I am investigating solutions for automating an 'Invisible' Application and believe that using a Grid may solve many of my problems. Does anyone have any experience using this technique with Silk Test or know of any good resources I could contact.
Answer1:
If you use QA Partner, you should know, what to work it is possible only with one application, because include file (xxxxx.inc) only one. You can work it is possible with different windows, but only from one application.
Answer2:
As far as the QA Partner list - I would say it is dead. The SilkTest list at Onelist.com (this list) is much better anyway, since all the messages are archived for people to go back and search on. Plus, each user can control how they want it - each message or in digest mode.
Answer3:
As I know, you can work with several applications simultaneuosly. QA Partner/SilkTest doesn't limit you from that. You can run into the problem with using the default recovery system for all applications under test, but this problem can be solved too.
21. How to assign attribute values to test cases?
- Make sure your testplan is open.
- Click on the test case for which you want to assign an attribute value.
- Click Testplan/Detail menu. The Testplan Details dialog box shows up.
- Click the Test Attribute tab.
- Click the Component field. The dropdown list shows up with all values of "Component".
- Select one of the values in the dropdown list.
- Click OK.
22. Prob regarding close the Child Window
Answer1:
1. Identify the process handle and
2. kill it First child and then the MainWindow.
Answer2:
Integer HWnd=Browser.GetHandle() ///before child popup opens
....then your code
While Browser2.Exists()
{
If Browser.GetHandle()!=HWnd
Browser.Close()
Else
Browser2.SetActive()
}
You can also use window caption in the former code.
Answer3:
I think the tag to identify the parent and child are not unique, that is why the parent is closed...try to make the window id unique and then close the page...
First activate the child using and then close....It should work....
23. How to create a test frame?
- Make sure your Web browser is active and showing your Web application home page. Do not minimize this Web page window.
- Make sure your test project is open.
- Click File/New menu. The New dialog box shows up.
- Select the Test Frame radio button.
- Click OK. The New Test Frame dialog box shows up with a list all active Web applications.
- Select your Web application.
- Enter a test frame name. For example: HomeFrame.inc.
- Review the window name. It should be the HTML title your Web application. You can rename it, if needed.
- Click OK to close the New Test Frame dialog box.
- Click File/Save menu.
This will continue in Borland SilkTest FAQ Part2