Share this page

# Example: TE_find_text

In the following example, after logging in as root to the machine "stimpy", TE_find_text searches for the string "UNIX*" in the terminal. The test run searches for text anywhere in the first row, without knowing the precise length of the row. Since the col2 parameter is set to -1, the function will search for text until the last column in the first line.

    int col, row;
    char match [100];

    TE_wait_text("login: ", 90);
    TE_wait_cursor(8, 5, 100, 90);
    TE_type("root<kReturn>");
    TE_wait_text("Password: ", 90);
    TE_type("qwerty<kReturn>"); /* Password is qwerty */
    TE_wait_text("stimpy:{/}# ", 90); /* Machine name is stimpy */
    TE_find_text ("*UNIX*", -1,-1,-1,1, &col, &row, match);

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: