QTP Interview Questions

Showing Questions 1 - 20 of 46 Questions
First | Prev | Next | Last Page
Sort by: 
 | 
Jump to Page:
  •  

    Can any one explain in Detail abt how to handle virtuall objects in QTP 8.2

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Kodati

    • Feb 7th, 2006


    through virtual object wizard you can define an object.

    Tools->virtual object wizard->new virtual object..

    It is a 4 step process in which you can define an unknown object to user defined class.

    Kodati

    • Feb 7th, 2006

    through virtual object wizard you can define an object.Tools->virtual object wizard->new virtual object..It is a 4 step process in which you can define an unknown object to user defined class.

  •  

    How to automate Oracle application using QTP.

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Srinivas Potnuru

    • Jun 6th, 2006


    The Prerequisit for Automating the Oracle Application is that You should have a Oracle Add - in for QTP.

    After that we need to open the oracle applications and then start recording the oracle Applications.

    The only difference between the Web Based and Oracle Applications is that wou will have different objects for the Oracle Applications like

    1) OracleTextField.

    2) OracleFormWindow.

    3) OracleFlexWindow.

    4) OracleNotification.

    etc....

    Srinivas Potnuru

    • Jun 6th, 2006

    The Prerequisit for Automating the Oracle Application is that You should have a Oracle Add - in for QTP.After that we need to open the oracle applications and then start recording the oracle Applicati...

  •  

    What is Per action and Shared recording?

    Give advantages and disadvantages of Per action and Shared ?

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: srinivas potnuru

    • Jun 9th, 2006


    Hi,

    Both Per action and shared has its own advantages and disadvantages.

    Per Action:

    ? When we ?Record by setting the repository to Per action each and every action will have its own repository. So each action will be independent with the other action w.r.t the Object Repository.

    Shared:

    When we record by setting the Object Repository to shared mode, all the actions in that particular Test can use the same Shared Object Repository . i.e there will be only one repository which contains all the objects that are required across all the actions.

    I am giving this as per my Knowledge there may be some more as well...

    TypeAdvantagesDisadvantages
    PerActionThe actions can be reused and as the repositories are individual there wont be any problem with the Objects.If there are few objects that are being used in more than one action then there will be a duplicate occurence of the object in the object Repository as the object repositories are different for different actions
    SharedThere will be only one Object Repository and can be maintained easily
    Shared

    Even if there is a need of using same object in more than one action, then there will be only one occurrence of the Object in the Object Repository.As the Object Repository is shared.

    ??????????

    srinivas potnuru

    • Jun 9th, 2006

    Hi,Both Per action and shared has its own advantages and disadvantages.Per Action: ? When we ?Record by setting the repository to Per action each and every action will have its own repository. So ea...

  •  

    How to find the number of WebButtons in a screen while runtime?

    Star Read Best Answer

    Editorial / Best Answer

    amereetto  

    • Member Since Jul-2007 | Mar 27th, 2011


    Hi,


    Below is the example to find the number of WebButtons in a page. I have have coded iot for Google page:

    Dim oDesc 'Description Object
    Dim colObject 'Object Collection

    Set oDesc = Description.Create
    oDesc( "micclass" ).value = "WebButton"
    'Additional property- for more focused and controlled collection
    oDesc( "Type" ).value = "submit"
    Set colObject = Browser( "name:=Google").Page("title:=Google").ChildObjects( oDesc )
    Msgbox colObject.Count 'Returns the number of webbutton

    Thanks.
    Debajit

  •  

    How do you test oracle application using qtp?

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Nageswara Rao G

    • Jan 29th, 2006


    With Help of Below Commands, first u launch the Oracle Applications and then Test with the help of Data Driven and DML and DDL commandsqtApp.Test.Settings.Launchers("Oracle 8i").Active = TrueqtApp.Test.Settings.Launchers("Oracle 8i").CommandLine = qtApp.Test.Settings.Launchers("Oracle 8i").WorkingDirectory =

    Brian

    • Feb 6th, 2006

    For testing Oracle Apps with QTP, I would suggest you define your test cases using MS Word documents. Then categorize them by complexity into low, med and high. After that, I would target your low complexity scripts for QTP and use them as regression testing scripts.

    Nageswara Rao G

    • Jan 29th, 2006

    With Help of Below Commands, first u launch the Oracle Applications and then Test with the help of Data Driven and DML and DDL commandsqtApp.Test.Settings.Launchers("Oracle 8i").Active = TrueqtApp.Tes...

  •  

    How to add a failure from a VBscript function to the results. how can I implement the functionality of checkpoint functionality from by VBScript. For Ex: I want to record a failure if some calculations evaluate to false.

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Guest

    • Feb 13th, 2006


    Put a Function in the Library and call this :

    Write_result Browser("sss").page("sscs").webElement("sss").check (checkpoint),"your step details"

    For Ex:

    Function Write_result(Flag,steps)
       Select Case Flag
       Case "True"
      Reporter.ReportEvent 0,"Debugger",steps
       Case "False"
      Reporter.ReportEvent 1,"Debugger",steps 
       Case 2
       Reporter.ReportEvent 2,"Debugger",steps
       Case 3
      Reporter.ReportEvent 3,"Debugger",steps
       Case 4
         Reporter.ReportEvent 4,"Debugger",steps
       Case Else
      Reporter.ReportEvent 1,"Debugger","Data entry error in the calling command"
       End Select
    End Function

    Guest

    • Feb 13th, 2006

    Put a Function in the Library and call this :Write_result Browser("sss").page("sscs").webElement("sss").check (checkpoint),"your step details"For Ex:Function Write_result(Flag,steps)   Selec...

    asha

    • Feb 11th, 2006

    Take the evaulation result in some varaible and now depending upon the result send the response in the result file through "Reporter function" of QTP

  •  

    Write sample code of Descriptive programming for yahoo login form?

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: srinivas potnuru

    • Jun 12th, 2006


    This is the code for Yahoo Photos Website you can do the same for the yahoo by changing the values in the required places.
    CODE: Browser("title:=Yahoo! Photos*.*")
    .page("title:=Yahoo! Photos*.*")
    .WebEdit("name:=login")
    .set "srinivas" Browser("title:=Yahoo! Photos*.*")
    .page("title:=Yahoo! Photos*.*")
    .WebEdit("name:=passwd")
    .set "test"Browser("title:=Yahoo! Photos*.*")
    .page("title:=Yahoo! Photos*.*")
    .WebButton("name:=Sign In").click

    Prasanna Laxmi

    • Jul 4th, 2006

    Hi Srinivas, If you have any documents related to "Descriptive Programming", Can you please send those documents. I am in urgent need of that document.Thanks in Advance,Prasanna Laxmi

    srinivas potnuru

    • Jun 12th, 2006

    This is the code for Yahoo Photos Website you can do the same for the yahoo by changing the values in the required places. CODE: Browser("title:=Yahoo! Photos*.*") .page("title:=Yahoo! Photos*.*") ...

  •  

    How do you automate the user login to web application ?

    In QTP, How can I call different users to logon to a web application under test, one after the other? (In a while loop)I will appreciate your help.Thanks,

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: srinivas potnuru

    • Jun 13th, 2006


    Hi,

    there are so many ways

    1) Keeping the usernames and passwords in 2 arrays and then looping them

      as below


       usernames =array( "test1","test2","test3" )
       passwords = array ("pass1","pass2","pass3")

       i = 0
       iCount =  ubound(usernames)
       do  While (i <= iCount)   

            'code to set the username password in the application and do the other  steps as well so that u can again enter the username and password  in the application
            i=i+1
       loop

    2) Keeping the values in the Datatable and doing the same using datatable functions. 

    srinivas potnuru

    • Jun 13th, 2006

    Hi,there are so many ways1) Keeping the usernames and passwords in 2 arrays and then looping them  as below   usernames =array( "test1","test2","test3" )   passwords = array (...

  •  

    How do you test JAVA tree objects ?

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Taji

    • Jun 24th, 2006


    For testing Java Objects you need to install an additional Java Plugin. This will enable QTP to identify java objects. This should also solve the java tree problem.

    if you already have installed the java plug-in and asking for a method to test java tree objects, there is no single answer i can give. but you might have to apply your own logic through descriptive programming.

    Prashant

    • Jun 24th, 2006

    Hi Thanks for the answerI have installed java plugin object and have tried to give a call to the java object tree I just want to expand the Tree nodeplease can you send a small sample code which tests the Window explorer regardsPrashant

    Taji

    • Jun 24th, 2006

    For testing Java Objects you need to install an additional Java Plugin. This will enable QTP to identify java objects. This should also solve the java tree problem.if you already have installed the ja...

  •  

    What is the method used to focus on particuler field.I need the script.I will give example.I flights application login page by default the focus is on username field. for this i will check the focus was there or not by using getroproprty method but if focue is not there which method i need to use.

    kallol raha

    • Jul 19th, 2006

    To explicitly set focus on a control use .object.focus

    sreepalgummalla

    • Jun 8th, 2006

    hi guyss.....What is the method used to focus on particuler fie...?getroproperty: retrives the pericula property.setroproperty: set the property to perticula object.... to focus to the perti...

  •  

    How to write code in the Expert View for a Search engine?

    Pl. I need help in writing code in the Expert View for a Search engine. As we search ex: 'apple' it gets a Search criteria with (1 2 3 4....Next) pages. so it suppose to click the "Next" button until "Next" is disable. As i'm doing data driven for search criteria by recording with clicking 5 times "Next" button but when in the Run session some criteria is not displaying the same no.of pages...So, how...

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Guest

    • Jan 12th, 2007


    You can use object spy to get the name of the first page number (i.e. the "#1" button string will have either a 1 or a 0 in its string.)

    Then you can change this to a variable(say "x") and then use descriptive programming for the string.

    You will then have a Loop statement (preferably a For...Next Loop) to check on the max number of page number links that are available on the primary screen (say 5 is the max) and see if "Next Button" is still high lighted.

    If it is, click on next after reaching 5 till "Next button" is disabled or does not exist.

    When Next button is disabled, the Value of "x" is the total number of result pages(ie if the #1 link starts with a logical number of 1) and x +1 if the #1 link starts with a logical number of 0.

    Guest

    • Jan 12th, 2007

    You can use object spy to get the name of the first page number (i.e. the "#1" button string will have either a 1 or a 0 in its string.) Then you can change this to a variable(say "x") and then use de...

  •  

    What are the advantages and disavantages of QTP over Rational robot and which one is better?

    Star Read Best Answer

    Editorial / Best Answer

    md_vinodh  

    • Member Since Apr-2008 | Jun 30th, 2008


    Hi,

     All Testing tools are best , each one of them have their own advantages and disadvantages.

     Please find your Requirements, Time, Cost and other external factors, which one fullfil your requirements, it's best for you ....based on that choose the product

    Let me know

    Regards
    Vinodh M

    md_vinodh

    • Jun 30th, 2008

    Hi, All Testing tools are best , each one of them have their own advantages and disadvantages. Please find your Requirements, Time, Cost and other external factors, which one fullfil your requirements, it's best for you ....based on that choose the productLet me knowRegardsVinodh M

  •  

    How To run Shared object repository files in QTP ?

    Star Read Best Answer

    Editorial / Best Answer

    dsharma  

    • Member Since Feb-2006 | Jul 3rd, 2006


    Click on Test->Settings

    Click on Resources Tab

    At the right-bottom change object repository type from per-action to shared.

    Once you have saved a test script with per-action type of object repository you cannot change it to shared.

    Deepak

    • Jul 11th, 2006

    I would like to know is there any function to be written to include 2 different Object repository. If yes can i have the script.

  •  

    How to record Java application in QTP 8.2?

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: santosh

    • Jun 28th, 2006


    1)First install java-addin along with QTP.

    2)Set the reqired properties for objects to identify the objects in Tools..>Object identification(Mandatory and assistive properties)

    3)Test--->Click Record-->Select javaoption.or click F3.

    The script will come as..

    Javawindow("").JavaInternalframe("").Javalist("").Select""

  •  

    Connect QTP to QC

    How to connect QTP to Quality Center?

    Star Read Best Answer

    Editorial / Best Answer

    Satyesha  

    • Member Since May-2009 | Mar 29th, 2011


    Hi,
    We can?connect to QC from QTP through?QTP File options or direct Icon on QTP window.

    Go to your QTP?File->QC connections->Provide the Server URL->Login credentials->Project and Domain details to which you want to connect.
    Note:Check the Option to Auto connect to QC?with each QTP session , in order to avoid entering these details again & again.

    Satyesha

    • Mar 29th, 2011

    Hi,We can?connect to QC from QTP through?QTP File options or direct Icon on QTP window.Go to your QTP?File->QC connections->Provide the Server URL->Login credentials->Project and Domain details to ...

  •  

    QTP Sync

    Explain about Sync with an example

    Star Read Best Answer

    Editorial / Best Answer

    ch.bhaskar.mca  

    • Member Since Oct-2007 | Apr 6th, 2011


    Hi,

    As the name specifies, "Synchronization Point" is nothing but to say QTP to wait till some specified condition occurs. You can specify the conditions.

    We need Synchronization Point because we are always not sure how much time it takes for an Object to get loaded to a page/window.

    Let's take an example of "Login" page of any application. You want to provide "UserName" in the UserName field after opening the site via QTP.We can provide value only after "UserName" field is visible. But sometime it may take 10 seconds for the "UserName" field to be appear in the Login page. Sometime it may take 30 seconds (Depends upon the internet speed).At this point QTP script fails as the object is not displayed in the page. So here what we do through "Synchronization Point" is to tell QTP to wait untill the "UserName" field appears on the page, may it take 10 secs or 30 secs.

    There are 2 ways (for Web Application) you can acheive this as follows:

    Quote:> Browser("").Sync (Only in case of Web App) : QTP waits untill all the objects are loaded to the Browser

    > WaitProperty (Any type of App) : QTP waits untill the specified condition is satisfied
    Following is an example of "WaitProperty"

    Quote:Syntax: Object.WaitProperty "Property Type","Property Value",TimeOut

    Ex: Browser("Login").Page("Login").WebEdit("UserName").WaitProperty "visible",True,20000
    Browser("Login").Page("Login").WebEdit("UserName").Set "bhaskar"

    In the above example QTP waits untill the WebEdit "UserName" is visible in the page.Then it sets the UserName in the field.

    Hope it helps you.

  •  

    Object name is changing while executing test in QTP

    when i am recording in QTP the object name of the text box is text1 and it is changing while i am executing. whenever i am opening the login window it is assigning new names If it is like this how can i test the application

    Star Read Best Answer

    Editorial / Best Answer

    b.sainarayanarao  

    • Member Since Oct-2007 | Oct 23rd, 2007


    go to Resources menu-Object Repository-select the particular text object in left window pane. In right window pane select attached text column field value, a browse icon ('<#>') becomes visible and  click on  it and  select  Regular  expression  checkbox (click on 'No' option in a appeared dialogbox) and  exactly in the place  of  1  write  as  [0-9]*  
    example: text 1           'before  replacement
                    text [0-9]*    'after replacement  is valid
                    text[0-9]*    'after replacement  is not valid because no space in between text and regular expression

    shreyas

    • Jun 27th, 2006

    Hi You can test the window by using regular expression.

  •  

    How is automation used in QTP for regresstion testing ?

    Star Read Best Answer

    Editorial / Best Answer

    mana.kare  

    • Member Since Jan-2007 | Aug 16th, 2007


    Hi,

    I am giving an expample of regression testing.

    Example:

    We have a "Yahoo" web application. Suppose if yahoo is going to add a new features in their application it has to verify the existing web page along with new features. If it is adding new features for every two months, it has to test existing and new features every time. The repeated testing is nothing but regression.
    (means the new functionality does not effect on the existing functionality).

    we are using QTP to test the existing functionality is working proprly or not.

    Anil

    • Sep 13th, 2007

    Regression testing is the testing done to verify the defect fix. For example if you encountered a defect and report to a developer and developer fixed it and deliver the code again, then you verify that the defect is fixed. This testing is called as regression testing. I hope you understood.

  •  

    How to run a QTP test set stored in Quality Center server from command line?

    Star Read Best Answer

    Editorial / Best Answer

    Steiner  

    • Member Since Oct-2008 | Oct 1st, 2008


    You need to use the quality center OTA API - you can read the documentation by going to quality center Help->Documentation Library, and under API References, click  HP Quality Center Open Test Architecture API Reference (you will need to download this file to your local hard drive probably, since there is some XP patch that will not allow you to open CHM files from an external server). If you go to the index and search for "StartExecution Method (TestSet)", there is a very nice example at the bottom that shows you a vbs script that you could use to run a test set on your local machine, planned host, or a remote machine. Copy this code to a .vbs file, and execute that with the arguments you need. Let me know if you need any other info about this.

    Steiner

    • Oct 1st, 2008

    You need to use the quality center OTA API - you can read the documentation by going to quality center Help->Documentation Library, and under API References, click  HP Quality Center Open Test...

Showing Questions 1 - 20 of 46 Questions
First | Prev | Next | Last Page
Sort by: 
 | 
Jump to Page: