Rich InAdvanced Web Browser Automation

1,846 views

Published on

Advanced Web Browser Automation

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,846
On SlideShare
0
From Embeds
0
Number of Embeds
19
Actions
Shares
0
Downloads
30
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Rich InAdvanced Web Browser Automation

    1. 1. Automating and Testing Feature-Rich Web Pages
    2. 2. Automating Web Pages <ul><li>Frames </li></ul><ul><li>Multiple Browser Windows („Popups“) </li></ul><ul><li>Dialog boxes of all kinds </li></ul>Many web pages contain elements to help them organize their content better. These elements have in common that they are an additional challenge to web page automation.
    3. 3. Frames
    4. 4. Frames <ul><li>FRAME F=<x> </li></ul><ul><li>Number <x> depends on the position of the frame in the object tree of website </li></ul><ul><li>FRAME F=0 is used for the frame page itself or when switching to a website without frames </li></ul>Internet Macros recognizes frames automatically:
    5. 5. Demo <ul><li>iOpus Test </li></ul><ul><li>http://www.iopus.com/iim/demo/v6/frames/ </li></ul><ul><li>Real World Example </li></ul><ul><li>Frames: www.orbitz.com </li></ul>
    6. 6. Popups (More than one web page open at the same time)
    7. 7. Popups <ul><li>Internet Macros handles frames automatically </li></ul><ul><li>TAB T=<x> command </li></ul><ul><li>Number depends on the position of the window in the tab order. This might depend on history </li></ul><ul><li>Related commands are </li></ul><ul><li>TAB OPEN </li></ul><ul><li>TAB CLOSE </li></ul><ul><li>TAB CLOSEALLOTHER </li></ul>
    8. 8. Demo <ul><li>iOpus Test Page </li></ul><ul><li>http://www.iopus.com/iim/demo/v6/popup/ </li></ul><ul><li>Real World Example </li></ul><ul><li>http:// www.fool.com/calcs/calculators.htm (Opens calculator in second page) </li></ul>
    9. 9. Dialogs
    10. 10. Dialog examples
    11. 11. Javascript Dialogs <ul><ul><ul><li>ONDIALOG POS=<x> BUTTON=… CONTENT=… </li></ul></ul></ul><ul><li>POS is used when many dialogs occur directly after each other. Specify a specific decision for each dialog (POS=1 is first dialog, POS=2 is second dialog.) </li></ul><ul><li>CONTENT is used to fill out a Javascript PROMPT dialog. </li></ul><ul><li>Extract the text of a dialog with SET !EXTRACTDIALOG YES </li></ul>
    12. 12. Login Dialog <ul><li>ONLOGIN USER=username PASSWORD=password </li></ul><ul><li>The password is stored with the method you selected on the SECURITY tab of the options dialog. More details about the different password storage options later. </li></ul>
    13. 13. Download Dialog <ul><li>ONDOWNLOAD FOLDER=* FILE=+_{{yyyyymmdd_hhnnss}} </li></ul><ul><li>The general web page timeout also applies to downloads. If needed, you can also increase the timeout value inside the macro with SET !TIMEOUT </li></ul>
    14. 14. Download File Settings <ul><li>FOLDER Settings: </li></ul><ul><li>Empty or (&quot;*&quot;) => default folder or the absolute path to a folder, </li></ul><ul><li>FILE Settings: </li></ul><ul><li>Example: You want to download a file with the file name &quot;stockreport.pdf&quot; </li></ul><ul><li>If you use &quot; FILE=* &quot; you get &quot; stockreport.pdf &quot; </li></ul><ul><li>If you use &quot; FILE= Intel &quot; you get &quot; Intel .pdf &quot; (the original file extension is always preserved) </li></ul><ul><li>If you use &quot; FILE=+ Intel &quot; you get &quot; stockreport Intel .pdf &quot; (&quot; + &quot; means, that the text is appended to the original file name) </li></ul><ul><li>If you use &quot; FILE=+ _{{!NOW:YYYYMMDD_hhmmss}} &quot; you get &quot; stockreport_ 20040525_141030 .pdf &quot; </li></ul>
    15. 15. Security Dialog <ul><li>ONSECURITYDIALOG BUTTON=YES CONTINUE=YES </li></ul><ul><li>While testing web sites, you may want the macro to stop and report the security dialog to you. In this case, please use CONTINUE=NO </li></ul>
    16. 16. Certificate Dialog <ul><li>ONCERTIFICATEDIALOG C=<x> </li></ul><ul><li>Some secure web pages ask you to select a client side certificate. </li></ul>
    17. 17. Error Dialog <ul><li>ONERRORDIALOG BUTTON=YES CONTINUE=YES </li></ul><ul><li>While testing web sites, you may want the macro to stop and report the security dialog to you. In this case, please use CONTINUE=NO </li></ul>
    18. 18. Web Page Dialog <ul><li>ONWEBPAGEDIALOG KEYS=Hello{ENTER}{CLOSE} </li></ul><ul><li>Since web page dialogs can contain any number of buttons or boxes, this dialog is automated by sending a specific list to keyboard commands to them. Internet Macros has a wizard for testing the command. </li></ul>Web page dialogs are similar to standard JavaScript dialogs, but display HTML content instead.
    19. 19. Web Page Dialog Recording Screenshot
    20. 20. Demo <ul><li>iOpus Test Pages: </li></ul><ul><li>http://www.iopus.com/iim/demo/v6/dialogs/javascript.htm </li></ul><ul><li>http://www.iopus.com/iim/demo/v6/dialogs/html/ </li></ul><ul><li>Real world examples: </li></ul><ul><li>Security dialog: https:// forum.raidenftpd.com/showflat.php?Board = general&Number =40306 </li></ul><ul><li>Certificate: https:// direct.bankofamerica.com </li></ul><ul><li>Dialogs: http://www.javascriptkit.com/javatutors/alert2.shtml </li></ul>

    ×