Server side connections, such as CGI scripts, can use cookies both to store and retrieve information on the client side of the connection.
QuickTest stores cookies in the memory for each user, and the browser handles them as it normally would.
The cookie used by the Internet Explorer browser can be accessed through the browser's Document Object Model (DOM) using the .Object property in a function. In the following example the cookie collection is returned the from the browser.
Browser("Flight reservations").Page("Flight reservations").Object.Cookie
The server, not the browser, handles session IDs, usually by a cookie or by embedding the session ID in all links. This does not affect QuickTest.
When the server redirects the client, the client generally does not notice the redirection, and misdirections generally do not occur. In most cases, the client is redirected to another script. on the server. This additional script. produces the HTML code for the subsequent page to be viewed. This has no effect on QuickTest or the browser.
Meta. tags do not affect how the page is displayed. Generally, they contain information only about who created the page, how often it is updated, what the page is about, and which keywords represent the page's content. Therefore, QuickTest has no problem handling meta. tags.
Dynamically created Web pages utilizing Active Server Page technology have an .asp extension. Dynamically created Web pages utilizing Java Server Page technology have a .jsp extension. These technologies are completely server-side and have no bearing on QuickTest.
QuickTest complies with the COM standard.
QuickTest supports COM objects embedded in Web pages (which are currently accessible only using Microsoft Internet Explorer) and you can drive COM objects in VBScript.
XML is eXtensible Markup Language, a pared-down version of SGML for Web documents, that enables Web designers to create their own customized tags. QuickTest supports XML and recognizes XML tags as objects.
For more information, see the HP QuickTest Professional User's Guide, and the XMLUtil object in the Utility section of the HP QuickTest Professional Object Model Reference.
QuickTest provides direct access to the Internet Explorer's Document Object Model (DOM) through which you can access the HTML tags directly. Access to the DOM is performed using the .Object notation.
The function below demonstrates how to iterate over all the tags in an Internet Explorer page. The function then outputs the inner-text of the tags (the text contained between the tags) to the Test Results using the Reporter object.
' Use the on error option because not all the elements have inner-text.
On Error Resume Next
Set Doc = Browser("CNN Interactive").Page("CNN Interactive").Object
' Loop through all the objects in the page.
For Each Element In Doc.all
TagName = Element.TagName ' Get the tag name.
InnerText = Element.innerText ' Get the inner text.
' Write the information to the test results.
Reporter.ReportEvent 0, TagName, InnerText
Next
For information on the Internet Explorer DOM, browse to the following Web sites:
Document object:
http://msdn2.microsoft.com/en-us/library/ms531073.aspx
Other DHTML objects:
http://msdn2.microsoft.com/en-us/library/ms533054.aspx
General DHTML reference:
http://msdn2.microsoft.com/en-us/library/ms533050.aspx
For objects that do not support the Type method, use the Windows Scripting SendKeys method. For more information, see the Microsoft VBScript. Language Reference (choose Help > QuickTest Professional Help > VBScript. Windows Script. Host).
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16792402/viewspace-571206/ ,如需转载,请注明出处,否则将追究法律责任。