Showing posts with label Uncategorized | DotNetFactory. Show all posts
Showing posts with label Uncategorized | DotNetFactory. Show all posts

Monday, November 7, 2011

Alternate to Wait function

Function IOE(ObjectName,mtime)
a=ObjectName.Exist
b=1
while a=0
wait(1)
a=ObjectName.Exist
b = b + 1
if b=mtime then
a=1
end if
wend
End Function

Creating Objects

Creates a new, empty description object in which you can add collection of properties and values in order to specify the description object in place of a test object name in a step.
Syntax
set PropertiesColl = Description.Create
Example
1. set EditDesc = Description.Create()
EditDesc("Name").Value = "userName"
EditDesc("Index").Value = "0"
Browser("Welcome: Mercury").Page("Welcome: Mercury").WebEdit(EditDesc).Set "MyName"
2. 'Define User ID field object
Set oUserID = Description.Create()
oUserID("Class Name").Value = "WebEdit"
oUserID("name").Value = "j_username"

Clicking "webelement" within a cell of WebTable

This we can do more efficiently by using "Programmatic Descriptions" and substituting properties with variables(You can see in KB articles. But once case, I dont know why,"Programmatic Descriptions" did not work for me. Then I workaround by doing the below code :





numWTLen=Browser("Browser").Page("Page").Frame("Frame").WebTable("Table").RowCount

For i=1 to numWTLen

strConfigStatus=Trim(Browser("Browser").Page("Page").Frame("Frame").WebTable("Table").GetCellData(o,3))

If strConfigStatus="Configured" Then 'If this Condition satisfy, then only we are clicking "Web element" within Cell

'Putting Index value dynamically for every row.

DataTable.Value("Index",dtLocalSheet)=i 'Index starts from "0" but my Webtable first row contains Headings, hence i took index starts from "1"

Browser("Browser").Page("Page").Frame("Frame").WebElement("WebElement").Click

Exit For 'Exiting from "For" Loop

End If
Next


Note:Before executing the above code. we have to parameterize the " WebElement("WebElement")"
(right click on WebElement("WebElement") , choose object Properties and select "Parameter radio button").
property Name "Index" to "Local sheet" with Name "Index". And also obviously add "Index" property
to the " WebElement("WebElement")" property list and remove "innertext" property from property
list.

Example: WebElement("WebElement") contails two properties.
1) Name:html Tag Value=some tag
2) Name:Index Value=1


Thanks!
Raghubansh

Wednesday, October 12, 2011

QTP 11: Complete List of New Features

Here is the complete list of new features that are available in QTP 11

XPath and CSS based object identification

Identify objects not only using normal object identification but with XPath and CSS identifier properties. A much awaited and a killer feature

Good Looking and Enhanced Results Viewer

The new improved results viewer provides an executive summary page with summary data, pie charts and statistics for both the current and previous runs and a quick link to the previous run results.











Easy Regular Expressions

You can now create reg ex with the help of syntax hints. Regular Expression Evaluator is available to test regular expressions that you have created. Good One.

Now identify objects not only in relation to each other but in relation to neighboring objects.

With this feature, QTP 11 has moved beyond the unreliability of ordinal identifiers. Objects identified with ordinal identifiers are good only as long as they maintain their relative positions with respect to each other in the new build of application. In case if this position changes or gets interchanged, ordinal identifiers may go for a toss.
HP has now introduced Visual Relation Identifier.

A visual relation identifier is a set of definitions that enable you to identify the object in the application according its neighboring objects in the application. You can select neighboring objects that will maintain the same relative location to your object, even if the user interface design changes. You define visual relations in the Visual Relation Identifier dialog box, which is accessible from the local or shared object repository, and from the Object Properties dialog box.

Load Function Libraries at Run Time

With the help of LoadFunctionLibrary statement. You can now load a function library when a step runs instead of at the beginning of a run session.

Test Your GUI and UI-Less Application Functionality in One Test

Since QTP is integrated with Service Test, you can now test your GUI and non-GUI based apps in a single run.

Record Support

For FireFox is now available.

Much Awaited Log Tracking is available now

QTP 11 is capable of receiving Java or .NET log framework messages from your application which can then be embedded in the run results.

Embed/Run Javascript in web pages

You can use the new EmbedScript/EmbedScriptFromFile and RunScript/RunScriptFromFile functions to embed JavaScripts in all loaded browser pages. You can use these scripts to perform operations on, or retrieve data from, the browser pages in your application.

Manage Test Data

Improved test data management when integrated with Quality Center

Web 2.0 Toolkit Applications Support

QTP 11 now supports Web 2.0 Toolkit Applications out-of-the-box similar to any other add-ins.

Automatically Parameterize Steps

You can instruct QTP 11 to automatically parameterize test steps at the end of record session.

Silverlight Add-in

To test objects in Silverlight 2 and Silverlight 3 applications. [After installation, Silverlight Add-in is displayed in the Add-in Manager as a child add-in under the WPF Add-in]

Extend WPF and Silverlight Support

You can use WPF and Silverlight Add-in Extensibility SDK to develop support for testing third-party and custom WPF and Silverlight controls that are not supported out-of-the-box

Use Extensibility Accelerator for Web Add-in Extensibility Development

Avoid Downtime Due to License Server Failures

Useful for concurrent license users. With redundant license servers you can create failover, so that if your main license server fails, your remaining servers maintain availability of your licenses without causing any downtime or loss of licenses for users.