Creating a Browse Dialog Box - WinRunner

A browse dialog box allows you to select a file from a list of files, and returns the name of the selected file as a string.

You use the TSL function create_browse_file_dialog to create a browse dialog box. This function has the following syntax:

create_browse_file_dialog ( filter );

where filter sets a filter for the files to display in the Browse dialog box. You can use wildcards to display all files (*.*) or only selected files (*.exe or *.txt etc.).

In the following example, the browse dialog box displays all files with extensions .dll or .exe.

filename = create_browse_file_dialog( "*.dll;*.exe" );

CREATING A BROWSE DIALOG BOX

When the Open button is clicked, the name and path of the selected file is passed to the variable filename. If the Cancel button is clicked, an empty string (empty quotation marks) is passed to the variable filename.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics