Forum Discussion

guoguo's avatar
guoguo
Contributor
9 years ago

Very confusing problem in the key word test

Hi all,

 

We met a very confusing problem in our key word test. Our test tries to check the results of a function with all the value combinations of combobox1 and combobox2.

 

value=fn (combobox1.val, combobox2.val)

 

1) on the first page, we have combobox1 and combobox2

2) after select values from combo1 and combo2, go to second page and check value

3) then go back, only modify the selection of comb2, go to the second page and check value.

    Step 3) will repeat 10 times

4) then go to step 2) and repeat 20 times.

 

It means, we check about 200 values for the test.

 

After we resolving timing problem, we found the property check often throw error at the different places.  We made a video in order to check what happens before the property check throwed error. We found error happened in step 3. In this phase only the selection in combobox 2 should be modified. But in video, sometimes the combobox1 is modified; sometimes the combobox2 is also modified. The selections are which exist in the list. We check our code again and agin, it is correct. We only perform the new selection for combobox2 in the step3. More confusing thing is, sometimes the test can be completed successfully.

 

Does anyone ever met the same problem?

 

Regards,

Jie

 

3 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    If you would post that bit of code so we could see it, that would help a lot.

     

    Some suggestions in the meantime:

     

    Use Focus or Set_Focus on each combo box before you change it.

    Add a little longer delay between switching pages. 

    Check your name mapping and make sure both those combo boxes are clearly mapped.

    • guoguo's avatar
      guoguo
      Contributor

      Thank you. I will try with your suggestions. We don't set the focus before we change the value of the combobox. But we have already add delays.

       

       

      Best Regards,

       

      • guoguo's avatar
        guoguo
        Contributor

        Hi,

         

        we fixed this confusing problem. In our case, two comboboxes are dependent. The second combobox is dependent on the first one.

         

        We do the following modifications:

        1) add ..WaitAliasChild("combobox2", 500) on the first page

        2) delay(500) then go to the next page

        3) before we check the property of the value on the second page, we add "objVal.refresh()"

         

        The test works properly now.

         

        Thank you again for the reply.