Results 1 to 4 of 4

Thread: Random testing test cases

  1. #1
    Geek_Guest
    Guest

    Random testing test cases

    Scenario:

    2 combo boxes.
    1st combo contains a,b,c,d.
    2nd combo contains 10..20,20...30,30.40,...
    selecting 'a' shuld display 10.....20.,
    'b' shld display 20.......30.......and so on.
    tell the script?

    2. Random testing of 500 test cases in QTP?

    Question asked by visitor Gopi


  2. #2
    Expert Member
    Join Date
    Jan 2007
    Answers
    211

    Re: Random testing test cases

    For intCnt = 0 to combo1.GetRoProperty("items count")
    Browser().Page().Frame().WebCombo(combo1).Select intCnt
    Browser().Page().Frame().WebCombo(combo2).Select intCnt
    Next



    Regards
    Nawab


  3. #3

    Re: Random testing test cases

    NawabShaikh, the for loop is not going to work. He will eventually have to use the DataTable in order for all values to be processed in the form. The for loop will exhaust and the form will proceed with the last value.

    Also, your code is correct, except the fact that it will run out of bounds and the script will fail for the last item in the combo box. It should have been "combo1.GetRoProperty("items count")-1". Also, it is not necessary that both combo boxes have the same number of items, so again, if one has more items than the other, the script would fail.


  4. #4
    Expert Member
    Join Date
    Jan 2007
    Answers
    211

    Re: Random testing test cases

    thanks for the rectification, I am just presenting the basic logic for the selection , since the query doen't have exact control(Data) writing proper logic for the same is prone to error's. Thanks for the advice on the loop, I have personally missed it a lot many time's in my scripts.



    Regards,
    Nawab

    Quote Originally Posted by NawabShaikh View Post
    For intCnt = 0 to combo1.GetRoProperty("items count")
    Browser().Page().Frame().WebCombo(combo1).Select intCnt
    Browser().Page().Frame().WebCombo(combo2).Select intCnt
    Next



    Regards
    Nawab



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