Results 1 to 3 of 3

Thread: example

  1. #1


    The following example assumes that a test is performed on several Notepad windows opened simultaneously on the screen.
    The GUI file used by this test contains a regular expression that describes all Notepad windows. The logical name is "NotepadWin"; the physical description is:


    Since the description of both windows appearing on screen matches the regular expression in the GUI file, set_window cannot be used. (The function is unable to identify a unique window, and returns the error E_NOT_UNIQUE.)
    The test handles this by using two separate functions: GUI_set_window sets the active window in the GUI file (using the regular expression), and _set_window sets the active window in the AUT (using the physical description of the desired window).

    function set_notepad_window (file)

    auto desc, buff, rc;
    GUI_set_window ("NotepadWin");
    GUI_map_get_desc ("NotepadWin", "", desc, buff);
    GUI_desc_set_attr (desc, "label", "Notepad - "&file);
    rc = _set_window (desc, 0);
    return (rc);

    In the above example what exacly meant by File parameter,

    Whether it's logical name


  2. #2

    Re: example

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by shij_tester:

    In the above example what exacly meant by File parameter,

    Whether it's logical name
    I think that file parameter contains the description available in the GUI file. It's not logical name.

    Thanks & Regards,
    Thanks & Regards,
    Quote: Donít hesitate to initiate!

  3. #3

    Re: example

    File appears to be intended as the name of the file being edited in a given Notepad window, thus if "MyFile" is passed as the parameter, the GUI_desc_set_attr function will evaluate its final parameter thusly (concatentating the variable's value to the fixed string, "Notepad - "):

    GUI_desc_set_attr (desc, "label", "Notepad - MyFile");

    Charles Reace (charlesDOTreaceATverizonDOTnet)
    "Forward!" he cried from the rear, and the front ranks died.
    The generals sat, and the lines on the map moved from side to side.

    (Roger Waters, "Us and Them")
    web site | [url=http://www.ebookworm.us/[/url]

    [i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.&lt;/i] (The Song of Roland)



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:38 PM.

Copyright BetaSoft Inc.