Relevant for: GUI tests and components
UFT One 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 (for components, you do this in a user-defined 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 UFT One.
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 UFT One 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, UFT One 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 UFT One.
You can use UFT One Web Add-in Extensibility to add your own support for custom Web controls. The Web Add-in Extensibility SDK installs a sample toolkit support set that provides partial support for some advanced Web controlscontrols. You can use this sample to learn how to create your own support for your controls. For more details, see the UFT OneWeb Add-in Extensibility Developer Guide.
UFT One complies with the COM standard.
UFT One 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. UFT One supports XML and recognizes XML tags as objects.
For tests and scripted components: You can also create XML checkpoints to check the content of XML documents in Web pages, frames or files. UFT One also supports XML output and schema validation.
UFT One 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 run 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 run results. Reporter.ReportEvent 0, TagName, InnerText Next
How can I send keyboard key commands (such as shortcut commands) to objects that do not support the Type method?
For objects that do not support the Type method, use the Windows Scripting SendKeys method.