Results 1 to 5 of 5

Thread: QTP script

  1. #1
    Junior Member
    Join Date
    Apr 2010
    Answers
    25

    Lightbulb QTP script

    Hi all,
    I have written a script for save button. If i let it run, QTP clicks the save button, but cannot able to goto next screen. Its working fine if i work manually. can any one say me how to solve tis problem.

    My code is,
    strBrowser="title:=xxx"
    Browser(strBrowser).Page(strBrowser).Webbutton("name:=Save").FireEvent "onclick"
    Browser(strBrowser).Page(strBrowser).Webbutton("name:=Save").Click

    once save button is clicked the next screen should popup. it fails to popup the screen, but click function have been done. Even i tried using with wait(10) after safe button is clicked. its not working. plz help me from tis problem.

    thanks in advance,
    Preetha.

    Last edited by Bala Preetha; 01-10-2011 at 09:25 PM.

  2. #2
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: QTP script

    hi Preetha,

    For page you have passed browser values.. It is wrong please pass appropriate value for page and let me know...


    Quote Originally Posted by Bala Preetha View Post
    Hi all,
    I have written a script for save button. If i let it run, QTP clicks the save button, but cannot able to goto next screen. Its working fine if i work manually. can any one say me how to solve tis problem.

    My code is,
    strBrowser="title:=xxx"
    Browser(strBrowser).Page(strBrowser).Webbutton("name:=Save").FireEvent "onclick"
    Browser(strBrowser).Page(strBrowser).Webbutton("name:=Save").Click

    once save button is clicked the next screen should popup. it fails to popup the screen, but click function have been done. Even i tried using with wait(10) after safe button is clicked. its not working. plz help me from tis problem.

    thanks in advance,
    Preetha.


    Arise Awake And Stop Not Till The Goal Is Reached

  3. #3
    Contributing Member
    Join Date
    Jul 2010
    Answers
    44

    Re: QTP script

    You need to change the 'Replay Type'. Most likely you need to change it to '2'. Have a look at a site called 'KnowledgeInbox' and search for 'Replay Type'

    FYI - I did post this answer a week ago with a link to the information you require, but for some reason ADMIN did not authorise the post


  4. #4
    Junior Member
    Join Date
    Dec 2012
    Answers
    1

    Re: QTP script

    Hi Preetha,

    I am new to this QTP, I know basics but nowadays, advanced level is much in demand. Will you please explain that how you write this scripts, it is through manual or through record and play. Please let me know the easiest way to write the scripts?


  5. #5
    Junior Member
    Join Date
    May 2009
    Answers
    1

    Re: QTP script

    Hi Preetha,

    What can you do is, you need to send the keyboard strokes instead of click on "Save" button. You just need to send the "Enter" key hope it will work. After entering all the test data send the keyboard strokes. Find the code below.

    Set WshShell = CreateObject("WScript.Shell")
    WshShell.SendKeys "{ENTER}"
    wait(3)
    Set WshShell=Nothing

    Thanks,
    Manish Soni


  6.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact