Home > Web Automation Specific > Introduction

Introduction

Automating a Web based process uses the same techniques used to automate a Windows Application based process. Web automation is accomplished by:

Recording your Web navigation, editing the generated script to add iteration and conditional statements if needed, and executing the script.

  1. Start WinTask x64. If the Your First Script Wizard dialog box is displayed, click the Close button. The WinTask x64 Editor window should now be active.
  2. From the WinTask x64 toolbar, click the Rec button  to start recording your actions.
  3. The Start Recording Mode dialog box will appear asking "What do you want to start before recording?". Select the Internet Explorer radio button or Mozilla Firefox or Google Chrome radio button and click the OK button.
  4. In the following dialog box, Launching Internet Explorer or Launching Mozilla Firefox or Launching Google Chrome, type the Web address you wish to automate. Check A new window prompts a userid and password when the URL loads if a security window is displayed before the URL page can be fully displayed. Click the OK button. The specified page begins loading, the WinTask x64 Editor window becomes minimized and your actions on the web page are now recorded to populate the automation script. The floating WinTask x64 toolbar and a flashing icon in the Windows system tray (lower-right corner of your desktop) indicate that Recording mode is active.
  5. Perform all of the actions you wish to record, such as clicking links or buttons, menu selections, filling text fields, etc.
  6. Stop Recording mode by clicking the first icon  in the floating WinTask x64 toolbar or by clicking the flashing icon in the Windows system tray.
  7. Review the script that has been automatically generated. Make any necessary corrections such as misspellings or removing actions that were made in error.
  8. Restore your desktop to the same conditions as when you started Recording mode. Close the browser but leave WinTask x64 open.
  9. From the WinTask x64 toolbar, click the Play  button . You are prompted to save your script. The Compiler is launched, and if no compilation errors are detected, your script starts running.

You can stop execution of the script before it runs to completion by simultaneously pressing the Ctrl+Shift+Pause keys. The script stops execution once the active script statement completes its task.

Example code generated using Recording mode on www.wintask.com/demos with Internet Explorer:

StartBrowser("IE","www.wintask.com/demos")

UsePage("WinTask Demonstration Pages")
        ClickHTMLElement("A[INNERTEXT= 'Form']")

UsePage("Form")
        SelectHTMLItem("SELECT[NAME= 'subject']", "Web site")
        WriteHTML("INPUT TEXT[NAME= 'company']", "My Company")
        WriteHTML("INPUT TEXT[NAME= 'name']", "My Name")
        WriteHTML("INPUT TEXT[NAME= 'email']", "
test@test.com")
        ClickHTMLElement("INPUT CHECKBOX[NAME= 'contactsoon']")
        WriteHTML("TEXTAREA[NAME= 'message']", "My message")
        ClickHTMLElement("INPUT RESET[VALUE= 'Clear']")

CloseWindow("IEXPLORE.EXE|IEFrame|WinTask",1)


Example code generated using Recording mode on www.wintask.com/demos with Firefox:

StartBrowser("FF","www.wintask.com/demos")

UsePage("WinTask Demonstration Pages")
        ClickHTMLElement("A[INNERTEXT= 'Form']")

UsePage("Form")
        SelectHTMLItem("SELECT[NAME= 'subject']", "Web site")
        WriteHTML("INPUT TEXT[NAME= 'company']", "My Company")
        WriteHTML("INPUT TEXT[NAME= 'name']", "My Name")
        WriteHTML("INPUT TEXT[NAME= 'email']", "
test@test.com")
        ClickHTMLElement("INPUT CHECKBOX[NAME= 'contactsoon']")
        WriteHTML("TEXTAREA[NAME= 'message']", "My message")
        ClickHTMLElement("INPUT RESET[VALUE= 'Clear']")

CloseBrowser()



Example code generated using Recording mode on www.wintask.com/demos with Chrome:

StartBrowser("CH","www.wintask.com/demos")

UsePage("WinTask Demonstration Pages")
ClickHTMLElement("A[INNERTEXT= 'Form']")

UsePage("Form")
         SelectHTMLItem("SELECT[NAME= 'subject']", "Web site")
         WriteHTML("INPUT TEXT[NAME= 'company']", "My Company")
         WriteHTML("INPUT TEXT[NAME= 'name']", "My Name")
         WriteHTML("INPUT TEXT[NAME= 'email']", test@test.com)
         ClickHTMLElement("INPUT CHECKBOX[NAME= 'contactsoon']")
         WriteHTML("TEXTAREA[NAME= 'message']", "My message")
         ClickHTMLElement("INPUT RESET[VALUE= 'Clear']")
 
CloseBrowser()



See also

Web Synchronization
Web Advanced Synchronization
HTML Descriptor
HTML Descriptor Advanced
How To Measure Response Time
Data Driven Automation