Home > Articles > Testing web applications and web-sites with RoutineBot

Testing web applications and web-sites with RoutineBot

February 23rd, 2009

As long as RoutineBot is interface testing software, which use image patters for testing purposes it is easy to use for testing of online applications and web-sites.

Actually, for RoutineBot it doesn’t matter what to test — Windows application or web-based application or something else. RoutineBot does exactly as user does, e.g. search for some image pattern on the screen, then click on it or move mouse to it or select some option in the menu.

Here are some typical steps that should be included into web application testing script:

  1. Wait until the web-page will be fully loaded in your browser
  2. Do some action. For instance, click some button or on some link or select category from drop-list.
  3. Check results against expected results.

How to do this with RoutineBot?

To wait until page is loaded use the following code:

repeat

res:=MouseFocuse(‘tag-in-browser.bmp’,10000);

until res=1;

where tag-in-browser should be an image pattern for loaded tag in the browser.

How to check what results are there?

res1:=MouseFocuse(‘error-message1.bmp’,10000);

res2:=MouseFocuse(‘error-message2.bmp’,10000);

res3:=MouseFocuse(‘ok-message.bmp’,10000);

if res1 = 1 then res_msg:=’Failed: error message1′;

if res2 = 1 then res_msg:=’Failed: error message2′;

if res3 = 1 then res_msg:=’Passed’;

WriteText(‘C:\tmp\res.txt’, res_msg,1); //this command will append res_msg to the output file

  • Share/Bookmark

admin Articles

  1. February 24th, 2009 at 16:46 | #1

    How can I open a webpage say http://www.cnn.com using the Execute command?

    Thanks
    Mat

  2. admin
    February 24th, 2009 at 17:02 | #2

    You can do this by passing the URL to the, say, Internet Explorer, here how it looks in code (should be in one line):

    Execute(‘C:\Program Files\Internet Explorer\iexplore.exe’,'http://www.cnn.com/’);

  1. No trackbacks yet.