Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop Testing Forum : Testing Tools @ OneStopTesting : WinRunner @ OneStopTesting |
Topic: WinRunner Questions and Answers Part-9 |
|
Author | Message |
Mithi25
Senior Member Joined: 23Jun2009 Online Status: Offline Posts: 288 |
Topic: WinRunner Questions and Answers Part-9 Posted: 12Aug2009 at 11:11pm |
Winrunner Question 81: Which TSL functions you will use for Searching text on the window?
Which TSL
functions you will use for Searching text on the window?
find_text ( string, out_coord_array, search_area [, string_def ] ); string The string that is searched for.The string must be complete, contain no spaces, and it must be preceded and followed by a space outside the quotation marks. To specify a literal, case-sensitive string, enclose the string in quotation marks. Alternatively, you can specify the name of a string variable. In this case, the string variable can include a regular expression. out_coord_array The name of the array that stores the screen coordinates of the text (see explanation below). search_area The area to search, specified as coordinates x1,y1,x2,y2. These define any two diagonal corners of a rectangle. The interpreter searches for the text in the area defined by the rectangle. string_def Defines the type of search to perform. If no value is specified, (0 or FALSE, the default), the search is for a single complete word only. When 1, or TRUE, is specified, the search is not restricted to a single, complete word. Winrunner Question 82: Which TSL functions you will use for getting the location of the text string?
Which TSL
functions you will use for getting the location of the text string?
win_find_text ( window, string, result_array [, search_area [, string_def ] ] ); window The logical name of the window to search. string The text to locate. To specify a literal, case sensitive string, enclose the string in quotation marks. Alternatively, you can specify the name of a string variable. The value of the string variable can include a regular expression. The regular expression should not include an exclamation mark (!), however, which is treated as a literal character. For more information regarding Regular Expressions, refer to the "Using Regular Expressions" chapter in your User's Guide. result_array The name of the output variable that stores the location of the string as a four-element array. search_area The region of the object to search, relative to the window. This area is defined as a pair of coordinates, with x1,y1,x2,y2 specifying any two diagonally opposite corners of the rectangular search region. If this parameter is not defined, then the entire window is considered the search area. string_def Defines how the text search is performed. If no string_def is specified, (0 or FALSE, the default parameter), the interpreter searches for a complete word only. If 1, or TRUE, is specified, the search is not restricted to a single, complete word. Winrunner Question 83: Which TSL functions you will use for moving the pointer to that text string?
< ="text/">
< ="text/" ="http://pagead2.googlesyndication.com/pagead/show_ads.js">
google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);
win_move_locator_text (window, string [ ,search_area [ ,string_def ] ] ); window The logical name of the window. String The text to locate. To specify a literal, case sensitive string, enclose the string in quotation marks. Alternatively, you can specify the name of a string variable. The value of the string variable can include a regular expression (the regular expression need not begin with an exclamation mark). search_area The region of the object to search, relative to the window. This area is defined as a pair of coordinates, with x1, y1, x2, y2 specifying any two diagonally opposite corners of the rectangular search region. If this parameter is not defined, then the entire window specified is considered the search area. string_def Defines how the text search is performed. If no string_def is specified, (0 or FALSE, the default parameter), the interpreter searches for a complete word only. If 1, or TRUE, is specified, the search is not restricted to a single, complete word. Winrunner Question 84: Which TSL functions you will use for Comparing the text?
< ="text/">
< ="text/" ="http://pagead2.googlesyndication.com/pagead/show_ads.js">
google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);
Which TSL functions you will
use for Comparing the text? Winrunner Question 85: How to record a data driven test script using data driver wizard?
< ="text/">
< ="text/" ="http://pagead2.googlesyndication.com/pagead/show_ads.js">
google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);
You can use the DataDriver Wizard to convert your entire script or a part of your script into a data-driven test. For example, your test script may include recorded operations, checkpoints, and other statements that do not need to be repeated for multiple sets of data. You need to parameterize only the portion of your test script that you want to run in a loop with multiple sets of data. To create a data-driven test:
-> To your test script to open and close the data table, which are necessary in order to iterate rows in the table. Note that you can also add these statements to your test script manually. -> If you do not choose this option, you will receive a warning that your data-driven test must contain a loop and statements to open and close your datatable. -> Import data from a database: Imports data from a database. This option adds ddt_update_from_db, and ddt_save statements to your test script after the ddt_open statement. -> Note that in order to import data from a database, either Microsoft Query or Data Junction must be installed on your machine. You can install Microsoft Query from the custom installation of Microsoft Office. Note that Data Junction is not automatically included in your WinRunner package. To purchase Data Junction, contact your Mercury Interactive representative. For detailed information on working with Data Junction, refer to the documentation in the Data Junction package. -> Parameterize the test: Replaces fixed values in selected checkpoints and in recorded statements with parameters, using the ddt_val function, and in the data table, adds columns with variable values for the parameters. Line by line: Opens a wizard screen for each line of the selected test script, which enables you to decide whether to parameterize a particular line, and if so, whether to add a new column to the data table or use an existing column when parameterize data. -> Automatically: Replaces all data with ddt_val statements and adds new columns to the data table. The first argument of the function is the name of the column in the data table. The replaced data is inserted into the table.
Winrunner Question 86: What are the three modes of running the scripts?
What are the
three modes of running the scripts?
WinRunner provides three modes in which to run tests—Verify, Debug, and Update. You use each mode during a different phase of the testing process.
Winrunner Question 87: Explain the TSL function “Ddt_open”
< ="text/">
< ="text/" ="http://pagead2.googlesyndication.com/pagead/show_ads.js">
google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);
It creates or opens a datatable file so that WinRunner can access it. Syntax: ddt_open ( data_table_name, mode ); data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0. mode The mode for opening the data table: DDT_MODE_READ (read-only) or DDT_MODE_READWRITE (read or write). Winrunner Question 88: Explain the TSL function "Ddt_save"
Explain the TSL function "Ddt_save"
Saves the information into a data file. Syntax: dt_save (data_table_name); data_table_name: The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. Winrunner Question 89: Explain the TSL function "Ddt_close"
< ="text/">
< ="text/" ="http://pagead2.googlesyndication.com/pagead/show_ads.js">
google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);
Explain the TSL function "Ddt_close" Winrunner Question 90: Explain the following TSL functions: Ddt_exportExplain the following TSL functions: Ddt_exportExports the information of one data table file into a different data table file. Syntax: ddt_export (data_table_namename1, data_table_namename2); data_table_namename1 The source data table filename. data_table_namename2 The destination data table filename.
Edited by Mithi25 - 12Aug2009 at 11:14pm |
|
Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.