Forum Discussion

sedens's avatar
sedens
Contributor
3 years ago

"There was an attempt to perform an action on a zero-sized window." error message in FF only

I am getting an "There was an attempt to perform an action on a zero-sized window." error message in Firefox 98 in my python script.  This script has been run in Chrome, IE and Edge without any issues. I am using TestComplete to version 15.40 and Firefox version 98 (with the patch). 

 

I have narrowed down the issue to a scenario where I click on a user icon on the top right corner of a webpage which opens a dropdown menu and then I click on "Logout" option. It fails on the step where it clicks on the "Logout" option. See screenshot below.

 

If I step through the code on those two lines after the wait method (see code below), it does not trip the error so I'm wondering if this is due to the "txtUser.linkLogout" object not being ready/visible during execution. I am at a loss what to do to fix this as it seems specific to Firefox only. 

 

The (python) code is this:

browser = Alias.browser

page = browser.pageHomePage

page.Wait()

page.linkButton.imgUserProfile.Click()

page.txtUser.linkLogout.Click()  <---- fails on this line

 

 

The Name Mapping looks like this

> pageHomePage

     > linkButton

        - imgUserProfile

    > txtUser

        - linkLogout

 

Any suggestions/advice appreciated. Thanks!

 

1 Reply

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    If the test works when you step through it, then I agree we are looking at a timing issue. Try checking for Exists and Enabled on that logout button before you click it and see what happens.