"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.txtUser.linkLogout.Click() <---- fails on this line
The Name Mapping looks like this
Any suggestions/advice appreciated. Thanks!
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.
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.