Why Object.Exist = True returns False when object exists?

1 Star2 Stars3 Stars4 Stars5 Stars (5)
Loading ... Loading ...

Recently answering a quiz on LearnQTP and this query being asked on KnowledgeInbox forums I thought of explaining my answer. Consider the code shown below
If Browser("Browser").Page("Page").WebEdit("test").Exist(0) = True Then
Msgbox "Object Exist"
Else
Msgbox "Object Does not exist"
End if
The code above executes fine but it will always display “Object does [...]

Register or Login to read the full article...

Object Repository is not loaded when using ObjectRepositortUtil

1 Star2 Stars3 Stars4 Stars5 Stars (8)
Loading ... Loading ...

We executed the below code in QTP and found that things don’t work the way they are supposed to

Dim RepositoryFrom
Set RepositoryFrom = CreateObject("Mercury.ObjectRepositoryUtil")
RepositoryFrom.Load "C:\KIB\Demo.tsr"
Browser("KIB").Page("KIB").WebEdit("test").Set "Test"

The Browser(”KIB”).Page(”KIB”).WebEdit(”test”) object is present in the demo.tsr file. Another version of the code that does not work is as below

Set RepositoryFrom = CreateObject("Mercury.ObjectRepositoryUtil")
RepositoryFrom.Load "C:\KIB\Demo.tsr"
Set oTestEdit = RepositoryFrom.Load("Browser(""KIB"").Page(""KIB"").WebEdit(""test"")")
oTestEdit.Set "Test"

The code snippets [...]

Register or Login to read the full article...

Failed to connect to Siebel when using SWECmd=AutoOn

1 Star2 Stars3 Stars4 Stars5 Stars (4)
Loading ... Loading ...

When launching the Siebel application with SWECmd=AutoOn parameter in the URL you might get a “Failed to connect to Siebel” error message. This error message indicates that the Siebel client package is corrupt and needs to be repaired. Corruption of Siebel packages can also cause QTP to stops identifying any of the Siebel objects even [...]

Register or Login to read the full article...

Is Smart Identification really smart?

1 Star2 Stars3 Stars4 Stars5 Stars (8)
Loading ... Loading ...

I have always been against the use of QTP Smart Identification (SI) feature whether it is development time to when the script are actually deployed for live testing. The reason behind this dislike is not personal but something logical. Most people think that Smart identification should be enabled when deploying the test scripts for live [...]

Register or Login to read the full article...

Exist returns False even when the object exist

1 Star2 Stars3 Stars4 Stars5 Stars (2)
Loading ... Loading ...

Exist method of QTP sometimes returns False even when the object exists. There could be 3 possible reasons in my opinion
Possible cause #1
One reason for this issue could be used of wrong properties to identify the object. Ex - you might be using a html id which has been changed now.
Possible cause #2
There are multiple [...]

Register or Login to read the full article...

Identifying custom windows control

1 Star2 Stars3 Stars4 Stars5 Stars (5)
Loading ... Loading ...

QTP identifies windows object using their classes. All default class map to a specified window Test object in QTP. Ex – The “Edit” class maps to WinEdit test object, “Static” class maps to the Static Test object.
Objects inside applications developed using standard windows API can be easily identified and automated through QTP.
But at times applications [...]

Register or Login to read the full article...

DP Part 4 - Common mistakes

1 Star2 Stars3 Stars4 Stars5 Stars (14)
Loading ... Loading ...

This article would go over some common mistakes people make while using Descriptive Programming (DP) in QTP.
Using strings with Pattern
Let’s assume we want to click a link “Logout (Tarun)” on my web page. Two possible methods that can be used are
Method 1

Browser("miccclass:=Browser").Page("micclass:=Page").Link("text:=Logout (Tarun)").Click

Method 2

Set oDesc = Description.Create
oDesc("text").Value = "Logout (Tarun)"
Browser("miccclass:=Browser").Page("micclass:=Page").Link(oDesc).Click

Now both the above methods will [...]

Register or Login to read the full article...

DP Part 2 - Converting OR based scripts to DP

1 Star2 Stars3 Stars4 Stars5 Stars (10)
Loading ... Loading ...

This article discusses how we can convert an Object repository based script to DP based script. For this we will do a simple recording of entering some text on Google.com search text box and clicking the Google search button
The QTP generated script would look something like below

SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
Browser("Browser").Page("Page").Sync
Browser("Browser").Navigate "http://www.google.com"
Browser("Browser").Page("Google").WebEdit("q").Set "KnowledgeInbox"
Browser("Browser").Page("Google").WebButton("Google Search").Click

All the names [...]

Register or Login to read the full article...

QTP FAQ, Tips & Tricks

1 Star2 Stars3 Stars4 Stars5 Stars (30)
Loading ... Loading ...

The article provides answers to most frequently asked question on Quick test pro 8.2. It also provides some tips and tricks. A must read for people working on QTP.
Data Table
Two Types of data tables

Global data sheet: Accessible to all the actions
Local data sheet: Accessible to the associated action only

Usage:

DataTable("Column Name",dtGlobalSheet) for Global data sheet
 
DataTable("Column Name",dtLocalSheet) [...]

Register or Login to read the full article...

  1. Suscribe to Email

    Enter your email address:

    Delivered by FeedBurner

  2. Most Viewed


  3. Sitemap

    open all | close all
  4. Most Rated

  5. Translator

    English flagItalian flagKorean flagChinese (Simplified) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flag
    Croat flagDanish flagFinnish flagHindi flagPolish flagRumanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flag
    Slovak flagSlovenian flagUkrainian flagVietnamese flag           
    By N2H

Your Ad Here