KabInfo.Net - Full Testing Tutorials - All Free
At KabInfo.Net you will find all the Manual and Automation Testing tutorials,
from basic Testing Definition and Testing Types,Testing Methodologies to
advanced Automation Tools like, WinRunner, LoadRunner and a Test Management
Tool like TestDirector.
KabInfo.Net - The Largest Enterprise Application Testers site on the Net |
|
|
7. Write a test to open Notepad enter some text which has
your name select replace from edit menu your name in find
what and enter WinRunner in replace with, verify that your
name is getting replaced WinRunner.
Sol:
invoke_application (“C:WINNT\\NOTEPAD.EXE”,””,””,SW_SHOW);
# Untitled – Notepad
#win_active (“Untitled - Notepad”);
set_window (“Untitled - Notepad”, 1);
obj_type (“Edit”,”my name is harish.”);
menu_select_item (“Edit_1;Replace…Ctrl+H”);
# Replace
set_window (“Notepad”, 2);
edit_set (“Find What:”, “harish”);
obj_type (“find what:”,”<kTab>”);
edit_set (“Replace with:”, “WinRunner”);
button_press (“Replace_2”);
# Notepad
set_window (“Notepad”, 3);
button_press (“OK”);
# Untitled – Notepad
set_window (“Untitled – Notepad”, 3);
edit_set_insert_pos (“Edit”, 0, 0);
# Replace
set_window (“Replace”, 5);
button_press (“Replace_2”);
button_press (“Replace_2”);
# Notepad
set_window (“Notepad”, 3);
button_press (“OK”);
# Replace
set_window (“Replace”, 18);
edit_get_text (“Replace with:”,text);
# Untitled – Notepad
set_window (“Untitled - Notepad”, 16);
edit_get_selection (“Edit”,value);
if (value==text)
printf(“success”);
else
printf(“failure”);
sol:try the same assignment with word pad.
# ans 7. (word pad).
Invoke_application
(“C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe”,””,””,SW_SHOW);
# Document – Wordpad
# Document – Wordpad
win_activate (“Document - Wordpad”);
set_window (“# Document – Wordpad”, 2);
obj_type (“RichEdit20W”,”my name is abcd.”);
menu_select_item (“Edit;Replace…Ctrl+H”);
# Replace
set_window (“Replace”, 14);
edit_set (“Replace with:”, “ggfghg”);
edit_get_text (“Replace with:”,text);
win_activate (“Replace”);
button_press (“Find Next”);
# Document – Wordpad
set_window (“Document - Wordpad”, 7);
edit_get_selection_pos (“RichEdit20W”,row1,col1,row2,col2);
newcol=col1+length(text);
# Replace
Win_activate (“Replace”);
Set_window (“Replace”, 2);
Button_press (“Replace_2”);
Edit_set_selection (“RichEdit20W”, row1,col1,row2,newcol);
# Wordpad
win_activate (“Wordpad”);
win_activate (“Wordpad”);
set_window (“Wordpad”, 4);
button_press (“OK”);
# Document – Wordpad
set_window (“Document - Wordpad”, 2);
edit_set_insert_pos (“RichEdit20W”, 0, 17);
edit_set_selection (“RichEdit20W”, 0, 11, 0, 18);
edit_set_selection (“RichEdit20W”,value);
report_msg(text);
report_msg (value);
if(text==value)
report_msg(“equal”);
else
report_msg(“not equal”); |
Where to Start
What does a Software Test Engineer have to know? What will the future bring?
KabInfo.Net will try to answer this, and help you become a professional
Software Test Engineer, well prepared for the future.
Before you study the tutorials,
Read this
introduction.
Because time is valuable, we deliver quick and easy learning. At KabInfo.Net,
you can study everything you need to learn, in an accessible and handy format.
"No One Is Great, And Every One Is GREAT"
K.A.Babu (2004)
Testing Joke
Tester : "I Delivered a 100% Bug Free Product!"
|
KabInfo.Net - Testing School is for self training only. We do not warrant the
correctness of the content. The risk of using it remains entirely with the user.
While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 2004
. All Rights Reserved.
Logo Courtesy - Venkat Battu
|
|