Forum Discussion

gdave's avatar
gdave
Regular Contributor
8 years ago

A very unusual behaviour

Hi all

 

I am experiencing a weired behaviour here.

 

My test item is a ComboBox for which I used Operation as 'Keys'. If I execute this for the first time, it keys the required value in the combobox however when I execute the same for the second time, the test is passed with the message in log as 'Keyboard input' however no value is actually input in the combobox.

I then changed the operation to 'Click' and my test failed with following message in the log " window is invisible and thus cannot be activated"................Any thoughts as to what's causing this behaviour ? Thanks

 

 

  • So I played around to provide some unique properties in name mapping editor and it worked :smileyvery-happy:!!

  • gdave's avatar
    gdave
    Regular Contributor

    So I played around to provide some unique properties in name mapping editor and it worked :smileyvery-happy:!!

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Another explanation is timing... there are, I'm assuming, events leading up to your actions on the combo box, perhaps opening it's screen.  If the test scripts are running faster than the application under test, it's possible that the actions are attempted before the box is fully enabled and ready to be interacted with.  I've seen this happen many times in my own applications under test.  Your best bet (and this is a good best practice for any application under test) is that, especially if you're opening a new form, web page, panel, etc, in your AUT, add some sort of method or code to wait for that form to be fully ready and available for interaction before you attempt to interact.  With web applications, this is usually by calling the "Wait" method on the page.  In a "past life" when I was testing a Delphi application, I wrote a custom routine that I would call every time I opened a new form to make sure it was active before I started any interactions with it.  Any number of techniques can be applied to do this.  But the behavior you've described is almost certainly related to the timing.

      • gdave's avatar
        gdave
        Regular Contributor

        I agree with you on this that it might be a possible timing issue however what I am forced to think here is, how is it possible that it works during the first run and then falls over for the second time...bit strange isn't it ? Thanks