|
Background
Use this page to set up a subwindow that will capture the effect of a
SetUserAgent command.
Sample Link
If your recording starts on this page, and clicks the link below, this SAME
page will open in a new window.
If you have a script that records this and uses the SetUserAgent command to modify the user agent string, then the sub-window will present itself to the server with the altered user agent string credentials.
This Link opens This Page in a New Window
Script
Here is a typical script that does this:
# Recording by eValid V9 # Copyright 2012 by Software Research, Inc. # Recording made on: Microsoft Windows XP Service Pack 3 ProjectID "Documentation" GroupID "Examples" TestID "UserAgent" LogID "AUTO" FontSize 0 DeleteCache DeleteCookies InitLink "http://www.e-valid.com/Products/Documentation.9/UserAgent/" \ "start.page.html" Wait 1000 # ---------------------------------------------------------------------------------- # Set up a sub-window for Apple iPhone 4 emulation... SetUserAgent "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+" \ " (KHTML, like Gecko) Version/3.0 Mobile/1C25 Safari/419.3" Wait 1000 # ---------------------------------------------------------------------------------- FollowLink 0 59 "This Link opens This Page in a New Window" "http://www." \ "soft.com/eValid/Products/Documentation.9/UserAgent/start.page.html" "" SubFrameSet 1 "eValid -- User Agent Start Page" # Actions taken on the sub-window will be as if from the specified device. # ---------------------------------------------------------------------------------- Wait 1000 WindowClose 1 # End of recording.Note: Be sure to make adjustments to your working directory structure as appropriate.