Forum Discussion

Guigz's avatar
Guigz
Occasional Contributor
2 months ago

My opened window from a button click close immediately

I am trying to click on a button inside a popup that will open a window to browse files, but when TestComplete click the button when running the Keyword Test, what happen is the following: the popup containing the button clicked close (as it should) and the window to browse files open and close immediately.

I am trying to do this in a python script that is executed in the Keyword Test. I tried ClickButton, Click, DoubleClick, but it all do the same. The button opening the window is in WPF.

If someone have an idea to keep the window open when it is opened by testcomplete, I would be thankful.

  • I changed the "Keys" manipulation part for "if else" that click directly the chosen item separately instead of trying to do it dynamically. This might not be viable for combobox with a lot of items, but I only had 4 and it seem to work in my case. 

  • What happens if you click through the test steps one at a time?

    • Guigz's avatar
      Guigz
      Occasional Contributor

      When I manually try to reproduce the steps, the window stay open as I would expect.

      • Guigz's avatar
        Guigz
        Occasional Contributor

        I just saw that before clicking the button I select an item from a combobox dropdown using the Keys("[Up]") and Keys("[Enter]"). If I don't do that part the window don't disappear, but I still need to do that part

  • Guigz's avatar
    Guigz
    Occasional Contributor

    I changed the "Keys" manipulation part for "if else" that click directly the chosen item separately instead of trying to do it dynamically. This might not be viable for combobox with a lot of items, but I only had 4 and it seem to work in my case.